RTEMS 4.11Annotated Report
Wed Mar 9 17:49:57 2011
0010f148 <IMFS_Set_handlers>:
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
10f148: 55 push %ebp
10f149: 89 e5 mov %esp,%ebp
10f14b: 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;
10f14e: 8b 50 10 mov 0x10(%eax),%edx
10f151: 8b 4a 34 mov 0x34(%edx),%ecx
switch( node->type ) {
10f154: 8b 10 mov (%eax),%edx
10f156: 83 7a 4c 07 cmpl $0x7,0x4c(%edx)
10f15a: 77 12 ja 10f16e <IMFS_Set_handlers+0x26><== NEVER TAKEN
10f15c: 8b 52 4c mov 0x4c(%edx),%edx
10f15f: ff 24 95 90 18 12 00 jmp *0x121890(,%edx,4)
10f166: 66 90 xchg %ax,%ax
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
10f168: 8b 51 0c mov 0xc(%ecx),%edx
10f16b: 89 50 08 mov %edx,0x8(%eax)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
10f16e: 31 c0 xor %eax,%eax
10f170: c9 leave
10f171: c3 ret
10f172: 66 90 xchg %ax,%ax
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
10f174: 8b 51 08 mov 0x8(%ecx),%edx
10f177: 89 50 08 mov %edx,0x8(%eax)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
10f17a: 31 c0 xor %eax,%eax
10f17c: c9 leave
10f17d: c3 ret
10f17e: 66 90 xchg %ax,%ax
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
10f180: c7 40 08 40 19 12 00 movl $0x121940,0x8(%eax)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
10f187: 31 c0 xor %eax,%eax
10f189: c9 leave
10f18a: c3 ret
10f18b: 90 nop
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
10f18c: 8b 51 10 mov 0x10(%ecx),%edx
10f18f: 89 50 08 mov %edx,0x8(%eax)
break;
}
return 0;
}
10f192: 31 c0 xor %eax,%eax
10f194: c9 leave
10f195: c3 ret
10f196: 66 90 xchg %ax,%ax
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
10f198: c7 40 08 c0 18 12 00 movl $0x1218c0,0x8(%eax)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
10f19f: 31 c0 xor %eax,%eax
10f1a1: c9 leave
10f1a2: c3 ret
0010fac0 <IMFS_check_node_remove>:
void IMFS_check_node_remove( IMFS_jnode_t *jnode )
{
10fac0: 55 push %ebp
10fac1: 89 e5 mov %esp,%ebp
10fac3: 53 push %ebx
10fac4: 83 ec 10 sub $0x10,%esp
10fac7: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
10faca: 53 push %ebx
10facb: e8 f8 04 00 00 call 10ffc8 <rtems_libio_is_file_open>
10fad0: 83 c4 10 add $0x10,%esp
10fad3: 85 c0 test %eax,%eax
10fad5: 75 2d jne 10fb04 <IMFS_check_node_remove+0x44>
10fad7: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx)
10fadc: 75 26 jne 10fb04 <IMFS_check_node_remove+0x44>
if ( rtems_filesystem_current.node_access == jnode )
10fade: a1 50 5a 12 00 mov 0x125a50,%eax
10fae3: 39 58 04 cmp %ebx,0x4(%eax)
10fae6: 74 58 je 10fb40 <IMFS_check_node_remove+0x80>
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
10fae8: 8b 43 4c mov 0x4c(%ebx),%eax
10faeb: 83 f8 04 cmp $0x4,%eax
10faee: 74 34 je 10fb24 <IMFS_check_node_remove+0x64>
10faf0: 83 f8 05 cmp $0x5,%eax
10faf3: 74 17 je 10fb0c <IMFS_check_node_remove+0x4c>
break;
default:
break;
}
free( jnode );
10faf5: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10faf8: 8b 5d fc mov -0x4(%ebp),%ebx
10fafb: c9 leave
break;
default:
break;
}
free( jnode );
10fafc: e9 d3 85 ff ff jmp 1080d4 <free>
10fb01: 8d 76 00 lea 0x0(%esi),%esi
}
}
10fb04: 8b 5d fc mov -0x4(%ebp),%ebx
10fb07: c9 leave
10fb08: c3 ret
10fb09: 8d 76 00 lea 0x0(%esi),%esi
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
10fb0c: 83 ec 0c sub $0xc,%esp
10fb0f: 53 push %ebx
10fb10: e8 df 23 00 00 call 111ef4 <IMFS_memfile_remove>
break;
10fb15: 83 c4 10 add $0x10,%esp
break;
default:
break;
}
free( jnode );
10fb18: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10fb1b: 8b 5d fc mov -0x4(%ebp),%ebx
10fb1e: c9 leave
break;
default:
break;
}
free( jnode );
10fb1f: e9 b0 85 ff ff jmp 1080d4 <free>
switch ( jnode->type ) {
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
break;
case IMFS_SYM_LINK:
free( jnode->info.sym_link.name );
10fb24: 83 ec 0c sub $0xc,%esp
10fb27: ff 73 50 pushl 0x50(%ebx)
10fb2a: e8 a5 85 ff ff call 1080d4 <free>
break;
10fb2f: 83 c4 10 add $0x10,%esp
default:
break;
}
free( jnode );
10fb32: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10fb35: 8b 5d fc mov -0x4(%ebp),%ebx
10fb38: c9 leave
break;
default:
break;
}
free( jnode );
10fb39: e9 96 85 ff ff jmp 1080d4 <free>
10fb3e: 66 90 xchg %ax,%ax
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;
10fb40: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
10fb47: eb 9f jmp 10fae8 <IMFS_check_node_remove+0x28>
0010ef08 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
10ef08: 55 push %ebp
10ef09: 89 e5 mov %esp,%ebp
10ef0b: 57 push %edi
10ef0c: 56 push %esi
10ef0d: 53 push %ebx
10ef0e: 83 ec 1c sub $0x1c,%esp
10ef11: 8b 7d 0c mov 0xc(%ebp),%edi
10ef14: 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;
10ef17: 8b 45 08 mov 0x8(%ebp),%eax
10ef1a: 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();
10ef1c: e8 bb 0e 00 00 call 10fddc <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
10ef21: 66 39 43 3c cmp %ax,0x3c(%ebx)
10ef25: 74 05 je 10ef2c <IMFS_chown+0x24>
10ef27: 66 85 c0 test %ax,%ax
10ef2a: 75 2c jne 10ef58 <IMFS_chown+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
10ef2c: 66 89 7b 3c mov %di,0x3c(%ebx)
jnode->st_gid = group;
10ef30: 66 89 73 3e mov %si,0x3e(%ebx)
IMFS_update_ctime( jnode );
10ef34: 83 ec 08 sub $0x8,%esp
10ef37: 6a 00 push $0x0
10ef39: 8d 45 e0 lea -0x20(%ebp),%eax
10ef3c: 50 push %eax
10ef3d: e8 0e 92 ff ff call 108150 <gettimeofday>
10ef42: 8b 45 e0 mov -0x20(%ebp),%eax
10ef45: 89 43 48 mov %eax,0x48(%ebx)
return 0;
10ef48: 83 c4 10 add $0x10,%esp
10ef4b: 31 c0 xor %eax,%eax
}
10ef4d: 8d 65 f4 lea -0xc(%ebp),%esp
10ef50: 5b pop %ebx
10ef51: 5e pop %esi
10ef52: 5f pop %edi
10ef53: c9 leave
10ef54: c3 ret
10ef55: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
10ef58: e8 87 43 00 00 call 1132e4 <__errno>
10ef5d: c7 00 01 00 00 00 movl $0x1,(%eax)
10ef63: b8 ff ff ff ff mov $0xffffffff,%eax
10ef68: eb e3 jmp 10ef4d <IMFS_chown+0x45>
0010efdc <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
10efdc: 55 push %ebp
10efdd: 89 e5 mov %esp,%ebp
10efdf: 57 push %edi
10efe0: 56 push %esi
10efe1: 53 push %ebx
10efe2: 83 ec 1c sub $0x1c,%esp
10efe5: 8b 45 08 mov 0x8(%ebp),%eax
10efe8: 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 )
10efeb: 85 c0 test %eax,%eax
10efed: 0f 84 ba 00 00 00 je 10f0ad <IMFS_create_node+0xd1> <== NEVER TAKEN
return NULL;
parent = parent_loc->node_access;
10eff3: 8b 38 mov (%eax),%edi
fs_info = parent_loc->mt_entry->fs_info;
10eff5: 8b 40 10 mov 0x10(%eax),%eax
10eff8: 8b 70 34 mov 0x34(%eax),%esi
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
10effb: 83 fb 07 cmp $0x7,%ebx
10effe: 0f 84 9c 00 00 00 je 10f0a0 <IMFS_create_node+0xc4>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
10f004: 50 push %eax
10f005: a1 50 5a 12 00 mov 0x125a50,%eax
10f00a: 8b 40 2c mov 0x2c(%eax),%eax
10f00d: f7 d0 not %eax
10f00f: 23 45 14 and 0x14(%ebp),%eax
10f012: 50 push %eax
10f013: ff 75 10 pushl 0x10(%ebp)
10f016: 53 push %ebx
10f017: e8 50 ff ff ff call 10ef6c <IMFS_allocate_node>
if ( !node )
10f01c: 83 c4 10 add $0x10,%esp
10f01f: 85 c0 test %eax,%eax
10f021: 74 73 je 10f096 <IMFS_create_node+0xba>
return NULL;
/*
* Set the type specific information
*/
if ( type == IMFS_DIRECTORY ) {
10f023: 83 fb 01 cmp $0x1,%ebx
10f026: 74 38 je 10f060 <IMFS_create_node+0x84>
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
10f028: 83 fb 03 cmp $0x3,%ebx
10f02b: 0f 84 97 00 00 00 je 10f0c8 <IMFS_create_node+0xec>
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
10f031: 83 fb 04 cmp $0x4,%ebx
10f034: 0f 84 8e 00 00 00 je 10f0c8 <IMFS_create_node+0xec>
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
10f03a: 83 fb 02 cmp $0x2,%ebx
10f03d: 74 79 je 10f0b8 <IMFS_create_node+0xdc>
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
10f03f: 83 fb 06 cmp $0x6,%ebx
10f042: 0f 84 8c 00 00 00 je 10f0d4 <IMFS_create_node+0xf8>
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
10f048: 83 fb 05 cmp $0x5,%ebx
10f04b: 0f 84 9b 00 00 00 je 10f0ec <IMFS_create_node+0x110>
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
} else if ( type == IMFS_FIFO ) {
10f051: 83 fb 07 cmp $0x7,%ebx
10f054: 75 1d jne 10f073 <IMFS_create_node+0x97> <== NEVER TAKEN
node->info.fifo.pipe = NULL;
10f056: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10f05d: eb 14 jmp 10f073 <IMFS_create_node+0x97>
10f05f: 90 nop
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10f060: 8d 50 54 lea 0x54(%eax),%edx
10f063: 89 50 50 mov %edx,0x50(%eax)
head->next = tail;
head->previous = NULL;
10f066: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10f06d: 8d 50 50 lea 0x50(%eax),%edx
10f070: 89 50 58 mov %edx,0x58(%eax)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
10f073: 89 78 08 mov %edi,0x8(%eax)
node->st_ino = ++fs_info->ino_count;
10f076: 8b 56 04 mov 0x4(%esi),%edx
10f079: 42 inc %edx
10f07a: 89 56 04 mov %edx,0x4(%esi)
10f07d: 89 50 38 mov %edx,0x38(%eax)
10f080: 83 ec 08 sub $0x8,%esp
10f083: 50 push %eax
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
10f084: 83 c7 50 add $0x50,%edi
10f087: 57 push %edi
10f088: 89 45 e4 mov %eax,-0x1c(%ebp)
10f08b: e8 90 cf ff ff call 10c020 <_Chain_Append>
return node;
10f090: 83 c4 10 add $0x10,%esp
10f093: 8b 45 e4 mov -0x1c(%ebp),%eax
}
10f096: 8d 65 f4 lea -0xc(%ebp),%esp
10f099: 5b pop %ebx
10f09a: 5e pop %esi
10f09b: 5f pop %edi
10f09c: c9 leave
10f09d: c3 ret
10f09e: 66 90 xchg %ax,%ax
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
10f0a0: 81 7e 10 20 18 12 00 cmpl $0x121820,0x10(%esi)
10f0a7: 0f 85 57 ff ff ff jne 10f004 <IMFS_create_node+0x28>
fs_info->fifo_handlers == &rtems_filesystem_handlers_default )
return NULL;
10f0ad: 31 c0 xor %eax,%eax
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
10f0af: 8d 65 f4 lea -0xc(%ebp),%esp
10f0b2: 5b pop %ebx
10f0b3: 5e pop %esi
10f0b4: 5f pop %edi
10f0b5: c9 leave
10f0b6: c3 ret
10f0b7: 90 nop
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
10f0b8: 8b 4d 18 mov 0x18(%ebp),%ecx
10f0bb: 8b 11 mov (%ecx),%edx
10f0bd: 89 50 50 mov %edx,0x50(%eax)
node->info.device.minor = info->device.minor;
10f0c0: 8b 51 04 mov 0x4(%ecx),%edx
10f0c3: 89 50 54 mov %edx,0x54(%eax)
10f0c6: eb ab jmp 10f073 <IMFS_create_node+0x97>
if ( type == IMFS_DIRECTORY ) {
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
10f0c8: 8b 4d 18 mov 0x18(%ebp),%ecx
10f0cb: 8b 11 mov (%ecx),%edx
10f0cd: 89 50 50 mov %edx,0x50(%eax)
10f0d0: eb a1 jmp 10f073 <IMFS_create_node+0x97>
10f0d2: 66 90 xchg %ax,%ax
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
10f0d4: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10f0db: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.linearfile.direct = 0;
10f0e2: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
10f0e9: eb 88 jmp 10f073 <IMFS_create_node+0x97>
10f0eb: 90 nop
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
10f0ec: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
10f0f3: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.file.indirect = 0;
10f0fa: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
node->info.file.doubly_indirect = 0;
10f101: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
node->info.file.triply_indirect = 0;
10f108: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
10f10f: e9 5f ff ff ff jmp 10f073 <IMFS_create_node+0x97>
0010a508 <IMFS_dump_directory>:
*/
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
10a508: 55 push %ebp
10a509: 89 e5 mov %esp,%ebp
10a50b: 57 push %edi
10a50c: 56 push %esi
10a50d: 53 push %ebx
10a50e: 83 ec 1c sub $0x1c,%esp
10a511: 8b 45 08 mov 0x8(%ebp),%eax
10a514: 8b 75 0c mov 0xc(%ebp),%esi
*
*/
int IMFS_memfile_maximum_size( void )
{
return IMFS_MEMFILE_MAXIMUM_SIZE;
}
10a517: 8b 78 50 mov 0x50(%eax),%edi
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
10a51a: 83 c0 54 add $0x54,%eax
10a51d: 89 45 e4 mov %eax,-0x1c(%ebp)
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
10a520: 39 c7 cmp %eax,%edi
10a522: 74 47 je 10a56b <IMFS_dump_directory+0x63>
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 );
10a524: 8d 46 01 lea 0x1(%esi),%eax
10a527: 89 45 e0 mov %eax,-0x20(%ebp)
10a52a: 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++ )
10a52c: 85 f6 test %esi,%esi
10a52e: 78 22 js 10a552 <IMFS_dump_directory+0x4a><== NEVER TAKEN
10a530: 31 db xor %ebx,%ebx
10a532: 66 90 xchg %ax,%ax
fprintf(stdout, "...." );
10a534: a1 c0 c4 12 00 mov 0x12c4c0,%eax
10a539: ff 70 08 pushl 0x8(%eax)
10a53c: 6a 04 push $0x4
10a53e: 6a 01 push $0x1
10a540: 68 32 72 12 00 push $0x127232
10a545: e8 da e0 00 00 call 118624 <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++ )
10a54a: 43 inc %ebx
10a54b: 83 c4 10 add $0x10,%esp
10a54e: 39 de cmp %ebx,%esi
10a550: 7d e2 jge 10a534 <IMFS_dump_directory+0x2c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
10a552: 83 ec 0c sub $0xc,%esp
10a555: 57 push %edi
10a556: e8 75 fe ff ff call 10a3d0 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
10a55b: 83 c4 10 add $0x10,%esp
10a55e: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10a562: 74 10 je 10a574 <IMFS_dump_directory+0x6c>
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
10a564: 8b 3f mov (%edi),%edi
IMFS_assert( level >= 0 );
IMFS_assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
10a566: 3b 7d e4 cmp -0x1c(%ebp),%edi
10a569: 75 c1 jne 10a52c <IMFS_dump_directory+0x24>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
10a56b: 8d 65 f4 lea -0xc(%ebp),%esp
10a56e: 5b pop %ebx
10a56f: 5e pop %esi
10a570: 5f pop %edi
10a571: c9 leave
10a572: c3 ret
10a573: 90 nop
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
10a574: 83 ec 08 sub $0x8,%esp
10a577: ff 75 e0 pushl -0x20(%ebp)
10a57a: 57 push %edi
10a57b: e8 88 ff ff ff call 10a508 <IMFS_dump_directory>
10a580: 83 c4 10 add $0x10,%esp
10a583: eb df jmp 10a564 <IMFS_dump_directory+0x5c>
0010f254 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
10f254: 55 push %ebp
10f255: 89 e5 mov %esp,%ebp
10f257: 57 push %edi
10f258: 56 push %esi
10f259: 53 push %ebx
10f25a: 83 ec 5c sub $0x5c,%esp
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
10f25d: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp)
10f264: 0f 85 ee 01 00 00 jne 10f458 <IMFS_eval_path+0x204> <== NEVER TAKEN
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10f26a: 8b 45 14 mov 0x14(%ebp),%eax
10f26d: 8b 38 mov (%eax),%edi
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
10f26f: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp)
10f276: 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 );
10f279: 8d 55 e4 lea -0x1c(%ebp),%edx
10f27c: 52 push %edx
10f27d: 56 push %esi
10f27e: ff 75 0c pushl 0xc(%ebp)
10f281: 8b 45 08 mov 0x8(%ebp),%eax
10f284: 03 45 a4 add -0x5c(%ebp),%eax
10f287: 50 push %eax
10f288: e8 17 07 00 00 call 10f9a4 <IMFS_get_token>
10f28d: 89 c3 mov %eax,%ebx
pathnamelen -= len;
10f28f: 8b 55 e4 mov -0x1c(%ebp),%edx
i += len;
if ( !pathloc->node_access )
10f292: 8b 4d 14 mov 0x14(%ebp),%ecx
10f295: 8b 01 mov (%ecx),%eax
10f297: 83 c4 10 add $0x10,%esp
10f29a: 85 c0 test %eax,%eax
10f29c: 0f 84 e6 00 00 00 je 10f388 <IMFS_eval_path+0x134> <== NEVER TAKEN
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
10f2a2: 29 55 0c sub %edx,0xc(%ebp)
i += len;
10f2a5: 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 )
10f2a8: 85 db test %ebx,%ebx
10f2aa: 75 44 jne 10f2f0 <IMFS_eval_path+0x9c>
* 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 ) {
10f2ac: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10f2b0: 0f 84 26 01 00 00 je 10f3dc <IMFS_eval_path+0x188>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
10f2b6: 83 ec 0c sub $0xc,%esp
10f2b9: ff 75 14 pushl 0x14(%ebp)
10f2bc: e8 87 fe ff ff call 10f148 <IMFS_Set_handlers>
10f2c1: 89 c3 mov %eax,%ebx
10f2c3: 5a pop %edx
10f2c4: 59 pop %ecx
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
10f2c5: ff 75 10 pushl 0x10(%ebp)
10f2c8: ff 75 14 pushl 0x14(%ebp)
10f2cb: e8 d4 fe ff ff call 10f1a4 <IMFS_evaluate_permission>
10f2d0: 83 c4 10 add $0x10,%esp
10f2d3: 85 c0 test %eax,%eax
10f2d5: 0f 85 d1 00 00 00 jne 10f3ac <IMFS_eval_path+0x158>
rtems_set_errno_and_return_minus_one( EACCES );
10f2db: e8 04 40 00 00 call 1132e4 <__errno>
10f2e0: c7 00 0d 00 00 00 movl $0xd,(%eax)
10f2e6: bb ff ff ff ff mov $0xffffffff,%ebx
10f2eb: e9 bc 00 00 00 jmp 10f3ac <IMFS_eval_path+0x158>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
10f2f0: 83 7f 4c 01 cmpl $0x1,0x4c(%edi)
10f2f4: 0f 84 be 00 00 00 je 10f3b8 <IMFS_eval_path+0x164>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
10f2fa: 89 c7 mov %eax,%edi
switch( type ) {
10f2fc: 83 fb 03 cmp $0x3,%ebx
10f2ff: 74 1b je 10f31c <IMFS_eval_path+0xc8>
10f301: 83 fb 04 cmp $0x4,%ebx
10f304: 0f 84 92 00 00 00 je 10f39c <IMFS_eval_path+0x148>
10f30a: 83 fb 02 cmp $0x2,%ebx
10f30d: 74 51 je 10f360 <IMFS_eval_path+0x10c>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
10f30f: 83 fb 04 cmp $0x4,%ebx
10f312: 0f 85 61 ff ff ff jne 10f279 <IMFS_eval_path+0x25> <== ALWAYS TAKEN
10f318: eb 92 jmp 10f2ac <IMFS_eval_path+0x58> <== NOT EXECUTED
10f31a: 66 90 xchg %ax,%ax <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
10f31c: 8b 40 4c mov 0x4c(%eax),%eax
10f31f: 83 f8 03 cmp $0x3,%eax
10f322: 0f 84 08 01 00 00 je 10f430 <IMFS_eval_path+0x1dc>
* It would be a design error if we evaluated the link and
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
10f328: 83 f8 04 cmp $0x4,%eax
10f32b: 0f 84 51 01 00 00 je 10f482 <IMFS_eval_path+0x22e>
}
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10f331: 48 dec %eax
10f332: 0f 85 35 01 00 00 jne 10f46d <IMFS_eval_path+0x219>
/*
* 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 ) {
10f338: 8b 47 5c mov 0x5c(%edi),%eax
10f33b: 85 c0 test %eax,%eax
10f33d: 0f 85 a4 00 00 00 jne 10f3e7 <IMFS_eval_path+0x193>
}
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10f343: 83 ec 08 sub $0x8,%esp
10f346: 56 push %esi
10f347: 57 push %edi
10f348: e8 eb 05 00 00 call 10f938 <IMFS_find_match_in_dir>
10f34d: 89 c7 mov %eax,%edi
if ( !node )
10f34f: 83 c4 10 add $0x10,%esp
10f352: 85 c0 test %eax,%eax
10f354: 74 32 je 10f388 <IMFS_eval_path+0x134>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
10f356: 8b 45 14 mov 0x14(%ebp),%eax
10f359: 89 38 mov %edi,(%eax)
10f35b: e9 19 ff ff ff jmp 10f279 <IMFS_eval_path+0x25>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10f360: 8b 15 50 5a 12 00 mov 0x125a50,%edx
10f366: 39 42 18 cmp %eax,0x18(%edx)
10f369: 0f 84 0a ff ff ff je 10f279 <IMFS_eval_path+0x25>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
10f36f: 8b 4d 14 mov 0x14(%ebp),%ecx
10f372: 8b 51 10 mov 0x10(%ecx),%edx
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
10f375: 39 42 1c cmp %eax,0x1c(%edx)
10f378: 0f 84 d2 00 00 00 je 10f450 <IMFS_eval_path+0x1fc>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
10f37e: 8b 78 08 mov 0x8(%eax),%edi
10f381: 85 ff test %edi,%edi
10f383: 75 d1 jne 10f356 <IMFS_eval_path+0x102>
10f385: 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 );
10f388: e8 57 3f 00 00 call 1132e4 <__errno>
10f38d: c7 00 02 00 00 00 movl $0x2,(%eax)
10f393: bb ff ff ff ff mov $0xffffffff,%ebx
10f398: eb 12 jmp 10f3ac <IMFS_eval_path+0x158>
10f39a: 66 90 xchg %ax,%ax
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
10f39c: e8 43 3f 00 00 call 1132e4 <__errno>
10f3a1: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10f3a7: bb ff ff ff ff mov $0xffffffff,%ebx
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10f3ac: 89 d8 mov %ebx,%eax
10f3ae: 8d 65 f4 lea -0xc(%ebp),%esp
10f3b1: 5b pop %ebx
10f3b2: 5e pop %esi
10f3b3: 5f pop %edi
10f3b4: c9 leave
10f3b5: c3 ret
10f3b6: 66 90 xchg %ax,%ax
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
10f3b8: 83 ec 08 sub $0x8,%esp
10f3bb: 6a 01 push $0x1
10f3bd: ff 75 14 pushl 0x14(%ebp)
10f3c0: e8 df fd ff ff call 10f1a4 <IMFS_evaluate_permission>
10f3c5: 83 c4 10 add $0x10,%esp
10f3c8: 85 c0 test %eax,%eax
10f3ca: 0f 84 0b ff ff ff je 10f2db <IMFS_eval_path+0x87>
10f3d0: 8b 55 14 mov 0x14(%ebp),%edx
10f3d3: 8b 02 mov (%edx),%eax
10f3d5: e9 20 ff ff ff jmp 10f2fa <IMFS_eval_path+0xa6>
10f3da: 66 90 xchg %ax,%ax
*
* 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 ) {
10f3dc: 8b 40 5c mov 0x5c(%eax),%eax
10f3df: 85 c0 test %eax,%eax
10f3e1: 0f 84 cf fe ff ff je 10f2b6 <IMFS_eval_path+0x62>
newloc = node->info.directory.mt_fs->mt_fs_root;
10f3e7: 8d 7d d0 lea -0x30(%ebp),%edi
10f3ea: 8d 70 1c lea 0x1c(%eax),%esi
10f3ed: b9 05 00 00 00 mov $0x5,%ecx
10f3f2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10f3f4: 8d 75 d0 lea -0x30(%ebp),%esi
10f3f7: b1 05 mov $0x5,%cl
10f3f9: 8b 7d 14 mov 0x14(%ebp),%edi
10f3fc: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
10f3fe: 8b 55 e4 mov -0x1c(%ebp),%edx
10f401: 8b 4d 14 mov 0x14(%ebp),%ecx
10f404: 8b 41 0c mov 0xc(%ecx),%eax
10f407: 51 push %ecx
10f408: ff 75 10 pushl 0x10(%ebp)
10f40b: 8b 4d 0c mov 0xc(%ebp),%ecx
10f40e: 01 d1 add %edx,%ecx
10f410: 51 push %ecx
10f411: 8b 4d a4 mov -0x5c(%ebp),%ecx
10f414: 29 d1 sub %edx,%ecx
10f416: 8b 55 08 mov 0x8(%ebp),%edx
10f419: 01 ca add %ecx,%edx
10f41b: 52 push %edx
10f41c: ff 10 call *(%eax)
10f41e: 89 c3 mov %eax,%ebx
10f420: 83 c4 10 add $0x10,%esp
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10f423: 89 d8 mov %ebx,%eax
10f425: 8d 65 f4 lea -0xc(%ebp),%esp
10f428: 5b pop %ebx
10f429: 5e pop %esi
10f42a: 5f pop %edi
10f42b: c9 leave
10f42c: c3 ret
10f42d: 8d 76 00 lea 0x0(%esi),%esi
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
10f430: 83 ec 08 sub $0x8,%esp
10f433: 6a 00 push $0x0
10f435: ff 75 14 pushl 0x14(%ebp)
10f438: e8 d3 fd ff ff call 10f210 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
10f43d: 8b 55 14 mov 0x14(%ebp),%edx
10f440: 8b 3a mov (%edx),%edi
10f442: 8b 47 4c mov 0x4c(%edi),%eax
10f445: 83 c4 10 add $0x10,%esp
10f448: e9 e4 fe ff ff jmp 10f331 <IMFS_eval_path+0xdd>
10f44d: 8d 76 00 lea 0x0(%esi),%esi
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
10f450: 8d 7d d0 lea -0x30(%ebp),%edi
10f453: 8d 72 08 lea 0x8(%edx),%esi
10f456: eb 95 jmp 10f3ed <IMFS_eval_path+0x199>
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
10f458: e8 87 3e 00 00 call 1132e4 <__errno> <== NOT EXECUTED
10f45d: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED
10f463: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED
10f468: e9 3f ff ff ff jmp 10f3ac <IMFS_eval_path+0x158> <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
10f46d: e8 72 3e 00 00 call 1132e4 <__errno>
10f472: c7 00 14 00 00 00 movl $0x14,(%eax)
10f478: bb ff ff ff ff mov $0xffffffff,%ebx
10f47d: e9 2a ff ff ff jmp 10f3ac <IMFS_eval_path+0x158>
* was broken.
*/
IMFS_assert( node );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
10f482: 83 ec 08 sub $0x8,%esp
10f485: 6a 00 push $0x0
10f487: ff 75 14 pushl 0x14(%ebp)
10f48a: e8 1d 00 00 00 call 10f4ac <IMFS_evaluate_sym_link>
10f48f: 89 c3 mov %eax,%ebx
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
10f491: 8b 4d 14 mov 0x14(%ebp),%ecx
10f494: 8b 39 mov (%ecx),%edi
if ( result == -1 )
10f496: 83 c4 10 add $0x10,%esp
10f499: 83 f8 ff cmp $0xffffffff,%eax
10f49c: 0f 84 0a ff ff ff je 10f3ac <IMFS_eval_path+0x158> <== NEVER TAKEN
/*
* In contrast to a hard link, it is possible to have a broken
* symbolic link.
*/
node = pathloc->node_access;
10f4a2: 8b 47 4c mov 0x4c(%edi),%eax
10f4a5: e9 87 fe ff ff jmp 10f331 <IMFS_eval_path+0xdd>
0010f5d4 <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 */
)
{
10f5d4: 55 push %ebp
10f5d5: 89 e5 mov %esp,%ebp
10f5d7: 57 push %edi
10f5d8: 56 push %esi
10f5d9: 53 push %ebx
10f5da: 83 ec 5c sub $0x5c,%esp
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
10f5dd: 8b 45 0c mov 0xc(%ebp),%eax
10f5e0: 8b 18 mov (%eax),%ebx
/*
* Get the path length.
*/
pathlen = strlen( path );
10f5e2: 31 c0 xor %eax,%eax
10f5e4: b9 ff ff ff ff mov $0xffffffff,%ecx
10f5e9: 8b 7d 08 mov 0x8(%ebp),%edi
10f5ec: f2 ae repnz scas %es:(%edi),%al
10f5ee: f7 d1 not %ecx
10f5f0: 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;
10f5f3: 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 );
10f5fa: 8d 55 e4 lea -0x1c(%ebp),%edx
10f5fd: 52 push %edx
10f5fe: 8d 4d af lea -0x51(%ebp),%ecx
10f601: 51 push %ecx
10f602: 56 push %esi
10f603: 8b 45 08 mov 0x8(%ebp),%eax
10f606: 03 45 a4 add -0x5c(%ebp),%eax
10f609: 50 push %eax
10f60a: e8 95 03 00 00 call 10f9a4 <IMFS_get_token>
10f60f: 89 c7 mov %eax,%edi
pathlen -= len;
10f611: 8b 55 e4 mov -0x1c(%ebp),%edx
10f614: 29 d6 sub %edx,%esi
i += len;
if ( !pathloc->node_access )
10f616: 8b 4d 0c mov 0xc(%ebp),%ecx
10f619: 8b 01 mov (%ecx),%eax
10f61b: 83 c4 10 add $0x10,%esp
10f61e: 85 c0 test %eax,%eax
10f620: 0f 84 55 01 00 00 je 10f77b <IMFS_evaluate_for_make+0x1a7><== NEVER TAKEN
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
10f626: 85 ff test %edi,%edi
10f628: 75 1a jne 10f644 <IMFS_evaluate_for_make+0x70>
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
10f62a: e8 b5 3c 00 00 call 1132e4 <__errno>
10f62f: c7 00 11 00 00 00 movl $0x11,(%eax)
10f635: 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;
}
10f63a: 89 d8 mov %ebx,%eax
10f63c: 8d 65 f4 lea -0xc(%ebp),%esp
10f63f: 5b pop %ebx
10f640: 5e pop %esi
10f641: 5f pop %edi
10f642: c9 leave
10f643: c3 ret
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
10f644: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10f648: 0f 84 c6 00 00 00 je 10f714 <IMFS_evaluate_for_make+0x140>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
10f64e: 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;
10f651: 89 c3 mov %eax,%ebx
switch( type ) {
10f653: 83 ff 02 cmp $0x2,%edi
10f656: 0f 84 88 00 00 00 je 10f6e4 <IMFS_evaluate_for_make+0x110>
10f65c: 76 26 jbe 10f684 <IMFS_evaluate_for_make+0xb0>
10f65e: 83 ff 03 cmp $0x3,%edi
10f661: 74 2d je 10f690 <IMFS_evaluate_for_make+0xbc>
10f663: 83 ff 04 cmp $0x4,%edi
10f666: 75 92 jne 10f5fa <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 );
10f668: e8 77 3c 00 00 call 1132e4 <__errno>
10f66d: c7 00 5b 00 00 00 movl $0x5b,(%eax)
10f673: 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;
}
10f678: 89 d8 mov %ebx,%eax
10f67a: 8d 65 f4 lea -0xc(%ebp),%esp
10f67d: 5b pop %ebx
10f67e: 5e pop %esi
10f67f: 5f pop %edi
10f680: c9 leave
10f681: c3 ret
10f682: 66 90 xchg %ax,%ax
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
10f684: 85 ff test %edi,%edi
10f686: 74 a2 je 10f62a <IMFS_evaluate_for_make+0x56><== NEVER TAKEN
10f688: e9 6d ff ff ff jmp 10f5fa <IMFS_evaluate_for_make+0x26>
10f68d: 8d 76 00 lea 0x0(%esi),%esi
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
10f690: 8b 40 4c mov 0x4c(%eax),%eax
10f693: 83 f8 03 cmp $0x3,%eax
10f696: 0f 84 b4 01 00 00 je 10f850 <IMFS_evaluate_for_make+0x27c>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
10f69c: 83 f8 04 cmp $0x4,%eax
10f69f: 0f 84 ca 01 00 00 je 10f86f <IMFS_evaluate_for_make+0x29b>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
10f6a5: 85 db test %ebx,%ebx
10f6a7: 0f 84 67 01 00 00 je 10f814 <IMFS_evaluate_for_make+0x240><== NEVER TAKEN
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
10f6ad: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10f6b1: 0f 85 5d 01 00 00 jne 10f814 <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 ) {
10f6b7: 8b 43 5c mov 0x5c(%ebx),%eax
10f6ba: 85 c0 test %eax,%eax
10f6bc: 0f 85 67 01 00 00 jne 10f829 <IMFS_evaluate_for_make+0x255>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
10f6c2: 83 ec 08 sub $0x8,%esp
10f6c5: 8d 45 af lea -0x51(%ebp),%eax
10f6c8: 50 push %eax
10f6c9: 53 push %ebx
10f6ca: e8 69 02 00 00 call 10f938 <IMFS_find_match_in_dir>
10f6cf: 89 c3 mov %eax,%ebx
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
10f6d1: 83 c4 10 add $0x10,%esp
10f6d4: 85 c0 test %eax,%eax
10f6d6: 74 64 je 10f73c <IMFS_evaluate_for_make+0x168>
done = true;
else
pathloc->node_access = node;
10f6d8: 8b 55 0c mov 0xc(%ebp),%edx
10f6db: 89 02 mov %eax,(%edx)
10f6dd: e9 18 ff ff ff jmp 10f5fa <IMFS_evaluate_for_make+0x26>
10f6e2: 66 90 xchg %ax,%ax
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
10f6e4: 8b 15 50 5a 12 00 mov 0x125a50,%edx
10f6ea: 3b 42 18 cmp 0x18(%edx),%eax
10f6ed: 0f 84 07 ff ff ff je 10f5fa <IMFS_evaluate_for_make+0x26>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
10f6f3: 8b 4d 0c mov 0xc(%ebp),%ecx
10f6f6: 8b 51 10 mov 0x10(%ecx),%edx
10f6f9: 3b 42 1c cmp 0x1c(%edx),%eax
10f6fc: 0f 84 8e 00 00 00 je 10f790 <IMFS_evaluate_for_make+0x1bc>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
10f702: 8b 58 08 mov 0x8(%eax),%ebx
10f705: 85 db test %ebx,%ebx
10f707: 74 72 je 10f77b <IMFS_evaluate_for_make+0x1a7>
rtems_set_errno_and_return_minus_one( ENOENT );
node = node->Parent;
}
pathloc->node_access = node;
10f709: 8b 4d 0c mov 0xc(%ebp),%ecx
10f70c: 89 19 mov %ebx,(%ecx)
break;
10f70e: e9 e7 fe ff ff jmp 10f5fa <IMFS_evaluate_for_make+0x26>
10f713: 90 nop
* 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 ) )
10f714: 83 ec 08 sub $0x8,%esp
10f717: 6a 01 push $0x1
10f719: ff 75 0c pushl 0xc(%ebp)
10f71c: 89 55 a0 mov %edx,-0x60(%ebp)
10f71f: e8 80 fa ff ff call 10f1a4 <IMFS_evaluate_permission>
10f724: 83 c4 10 add $0x10,%esp
10f727: 85 c0 test %eax,%eax
10f729: 8b 55 a0 mov -0x60(%ebp),%edx
10f72c: 0f 84 cd 00 00 00 je 10f7ff <IMFS_evaluate_for_make+0x22b>
10f732: 8b 4d 0c mov 0xc(%ebp),%ecx
10f735: 8b 01 mov (%ecx),%eax
10f737: e9 12 ff ff ff jmp 10f64e <IMFS_evaluate_for_make+0x7a>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
10f73c: 8b 45 a4 mov -0x5c(%ebp),%eax
10f73f: 2b 45 e4 sub -0x1c(%ebp),%eax
10f742: 03 45 08 add 0x8(%ebp),%eax
10f745: 8b 4d 10 mov 0x10(%ebp),%ecx
10f748: 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++) {
10f74a: 8b 4d 08 mov 0x8(%ebp),%ecx
10f74d: 8b 55 a4 mov -0x5c(%ebp),%edx
10f750: 8a 04 11 mov (%ecx,%edx,1),%al
10f753: 84 c0 test %al,%al
10f755: 74 75 je 10f7cc <IMFS_evaluate_for_make+0x1f8>
10f757: 89 d3 mov %edx,%ebx
10f759: 89 ce mov %ecx,%esi
10f75b: eb 0b jmp 10f768 <IMFS_evaluate_for_make+0x194>
10f75d: 8d 76 00 lea 0x0(%esi),%esi
10f760: 43 inc %ebx
10f761: 8a 04 1e mov (%esi,%ebx,1),%al
10f764: 84 c0 test %al,%al
10f766: 74 64 je 10f7cc <IMFS_evaluate_for_make+0x1f8>
if ( !IMFS_is_separator( path[ i ] ) )
10f768: 83 ec 0c sub $0xc,%esp
10f76b: 0f be c0 movsbl %al,%eax
10f76e: 50 push %eax
10f76f: e8 ec 97 ff ff call 108f60 <rtems_filesystem_is_separator>
10f774: 83 c4 10 add $0x10,%esp
10f777: 85 c0 test %eax,%eax
10f779: 75 e5 jne 10f760 <IMFS_evaluate_for_make+0x18c>
rtems_set_errno_and_return_minus_one( ENOENT );
10f77b: e8 64 3b 00 00 call 1132e4 <__errno>
10f780: c7 00 02 00 00 00 movl $0x2,(%eax)
10f786: bb ff ff ff ff mov $0xffffffff,%ebx
10f78b: e9 aa fe ff ff jmp 10f63a <IMFS_evaluate_for_make+0x66>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
10f790: 8d 7d d0 lea -0x30(%ebp),%edi
10f793: 8d 72 08 lea 0x8(%edx),%esi
10f796: b9 05 00 00 00 mov $0x5,%ecx
10f79b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10f79d: 8d 75 d0 lea -0x30(%ebp),%esi
10f7a0: b1 05 mov $0x5,%cl
10f7a2: 8b 7d 0c mov 0xc(%ebp),%edi
10f7a5: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
10f7a7: 53 push %ebx
10f7a8: 8b 55 0c mov 0xc(%ebp),%edx
10f7ab: 8b 42 0c mov 0xc(%edx),%eax
10f7ae: ff 75 10 pushl 0x10(%ebp)
10f7b1: 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 );
10f7b2: 8b 55 a4 mov -0x5c(%ebp),%edx
10f7b5: 2b 55 e4 sub -0x1c(%ebp),%edx
10f7b8: 03 55 08 add 0x8(%ebp),%edx
10f7bb: 52 push %edx
10f7bc: ff 50 04 call *0x4(%eax)
10f7bf: 89 c3 mov %eax,%ebx
10f7c1: 83 c4 10 add $0x10,%esp
10f7c4: e9 71 fe ff ff jmp 10f63a <IMFS_evaluate_for_make+0x66>
10f7c9: 8d 76 00 lea 0x0(%esi),%esi
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
10f7cc: 83 ec 0c sub $0xc,%esp
10f7cf: ff 75 0c pushl 0xc(%ebp)
10f7d2: e8 71 f9 ff ff call 10f148 <IMFS_Set_handlers>
10f7d7: 89 c3 mov %eax,%ebx
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
10f7d9: 8b 55 0c mov 0xc(%ebp),%edx
10f7dc: 8b 02 mov (%edx),%eax
10f7de: 83 c4 10 add $0x10,%esp
10f7e1: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
10f7e5: 75 2d jne 10f814 <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 ) )
10f7e7: 83 ec 08 sub $0x8,%esp
10f7ea: 6a 03 push $0x3
10f7ec: ff 75 0c pushl 0xc(%ebp)
10f7ef: e8 b0 f9 ff ff call 10f1a4 <IMFS_evaluate_permission>
10f7f4: 83 c4 10 add $0x10,%esp
10f7f7: 85 c0 test %eax,%eax
10f7f9: 0f 85 3b fe ff ff jne 10f63a <IMFS_evaluate_for_make+0x66>
rtems_set_errno_and_return_minus_one( EACCES );
10f7ff: e8 e0 3a 00 00 call 1132e4 <__errno>
10f804: c7 00 0d 00 00 00 movl $0xd,(%eax)
10f80a: bb ff ff ff ff mov $0xffffffff,%ebx
10f80f: e9 26 fe ff ff jmp 10f63a <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 );
10f814: e8 cb 3a 00 00 call 1132e4 <__errno>
10f819: c7 00 14 00 00 00 movl $0x14,(%eax)
10f81f: bb ff ff ff ff mov $0xffffffff,%ebx
10f824: e9 11 fe ff ff jmp 10f63a <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;
10f829: 8d 7d d0 lea -0x30(%ebp),%edi
10f82c: 8d 70 1c lea 0x1c(%eax),%esi
10f82f: b9 05 00 00 00 mov $0x5,%ecx
10f834: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*pathloc = newloc;
10f836: 8d 75 d0 lea -0x30(%ebp),%esi
10f839: b1 05 mov $0x5,%cl
10f83b: 8b 7d 0c mov 0xc(%ebp),%edi
10f83e: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
10f840: 51 push %ecx
10f841: 8b 4d 0c mov 0xc(%ebp),%ecx
10f844: 8b 41 0c mov 0xc(%ecx),%eax
10f847: ff 75 10 pushl 0x10(%ebp)
10f84a: 51 push %ecx
10f84b: e9 62 ff ff ff jmp 10f7b2 <IMFS_evaluate_for_make+0x1de>
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
10f850: 83 ec 08 sub $0x8,%esp
10f853: 6a 00 push $0x0
10f855: ff 75 0c pushl 0xc(%ebp)
10f858: e8 cb fc ff ff call 10f528 <IMFS_evaluate_link>
if ( result == -1 )
10f85d: 83 c4 10 add $0x10,%esp
10f860: 83 f8 ff cmp $0xffffffff,%eax
10f863: 74 29 je 10f88e <IMFS_evaluate_for_make+0x2ba><== NEVER TAKEN
10f865: 8b 45 0c mov 0xc(%ebp),%eax
10f868: 8b 18 mov (%eax),%ebx
10f86a: e9 36 fe ff ff jmp 10f6a5 <IMFS_evaluate_for_make+0xd1>
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
10f86f: 83 ec 08 sub $0x8,%esp
10f872: 6a 00 push $0x0
10f874: ff 75 0c pushl 0xc(%ebp)
10f877: e8 ac fc ff ff call 10f528 <IMFS_evaluate_link>
if ( result == -1 )
10f87c: 83 c4 10 add $0x10,%esp
10f87f: 83 f8 ff cmp $0xffffffff,%eax
10f882: 74 0a je 10f88e <IMFS_evaluate_for_make+0x2ba><== NEVER TAKEN
10f884: 8b 55 0c mov 0xc(%ebp),%edx
10f887: 8b 1a mov (%edx),%ebx
10f889: e9 17 fe ff ff jmp 10f6a5 <IMFS_evaluate_for_make+0xd1>
10f88e: 89 c3 mov %eax,%ebx <== NOT EXECUTED
10f890: e9 a5 fd ff ff jmp 10f63a <IMFS_evaluate_for_make+0x66><== NOT EXECUTED
0010f528 <IMFS_evaluate_link>:
*/
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10f528: 55 push %ebp
10f529: 89 e5 mov %esp,%ebp
10f52b: 57 push %edi
10f52c: 56 push %esi
10f52d: 53 push %ebx
10f52e: 83 ec 0c sub $0xc,%esp
10f531: 8b 75 08 mov 0x8(%ebp),%esi
10f534: 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 );
10f537: 8b 15 50 5a 12 00 mov 0x125a50,%edx
10f53d: eb 0e jmp 10f54d <IMFS_evaluate_link+0x25>
10f53f: 90 nop
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
10f540: 83 f8 04 cmp $0x4,%eax
10f543: 74 53 je 10f598 <IMFS_evaluate_link+0x70>
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
10f545: 83 e8 03 sub $0x3,%eax
10f548: 83 f8 01 cmp $0x1,%eax
10f54b: 77 3a ja 10f587 <IMFS_evaluate_link+0x5f><== ALWAYS TAKEN
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
10f54d: 8b 1e mov (%esi),%ebx
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
10f54f: 8b 42 30 mov 0x30(%edx),%eax
10f552: 40 inc %eax
10f553: 66 89 42 30 mov %ax,0x30(%edx)
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
10f557: 66 83 f8 05 cmp $0x5,%ax
10f55b: 77 57 ja 10f5b4 <IMFS_evaluate_link+0x8c>
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
10f55d: 8b 43 4c mov 0x4c(%ebx),%eax
10f560: 83 f8 03 cmp $0x3,%eax
10f563: 75 db jne 10f540 <IMFS_evaluate_link+0x18>
result = IMFS_evaluate_hard_link( node, flags );
10f565: 83 ec 08 sub $0x8,%esp
10f568: 57 push %edi
10f569: 56 push %esi
10f56a: e8 a1 fc ff ff call 10f210 <IMFS_evaluate_hard_link>
10f56f: 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 ) ) );
10f572: 85 c0 test %eax,%eax
10f574: 75 33 jne 10f5a9 <IMFS_evaluate_link+0x81>
10f576: 8b 43 4c mov 0x4c(%ebx),%eax
10f579: 8b 15 50 5a 12 00 mov 0x125a50,%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 ) ||
10f57f: 83 e8 03 sub $0x3,%eax
10f582: 83 f8 01 cmp $0x1,%eax
10f585: 76 c6 jbe 10f54d <IMFS_evaluate_link+0x25><== ALWAYS TAKEN
10f587: 31 c0 xor %eax,%eax
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
10f589: 66 c7 42 30 00 00 movw $0x0,0x30(%edx)
return result;
}
10f58f: 8d 65 f4 lea -0xc(%ebp),%esp
10f592: 5b pop %ebx
10f593: 5e pop %esi
10f594: 5f pop %edi
10f595: c9 leave
10f596: c3 ret
10f597: 90 nop
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
10f598: 83 ec 08 sub $0x8,%esp
10f59b: 57 push %edi
10f59c: 56 push %esi
10f59d: e8 0a ff ff ff call 10f4ac <IMFS_evaluate_sym_link>
10f5a2: 83 c4 10 add $0x10,%esp
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
10f5a5: 85 c0 test %eax,%eax
10f5a7: 74 cd je 10f576 <IMFS_evaluate_link+0x4e>
10f5a9: 8b 15 50 5a 12 00 mov 0x125a50,%edx
10f5af: eb d8 jmp 10f589 <IMFS_evaluate_link+0x61>
10f5b1: 8d 76 00 lea 0x0(%esi),%esi
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
10f5b4: 66 c7 42 30 00 00 movw $0x0,0x30(%edx)
rtems_set_errno_and_return_minus_one( ELOOP );
10f5ba: e8 25 3d 00 00 call 1132e4 <__errno>
10f5bf: c7 00 5c 00 00 00 movl $0x5c,(%eax)
10f5c5: b8 ff ff ff ff mov $0xffffffff,%eax
*/
rtems_filesystem_link_counts = 0;
return result;
}
10f5ca: 8d 65 f4 lea -0xc(%ebp),%esp
10f5cd: 5b pop %ebx
10f5ce: 5e pop %esi
10f5cf: 5f pop %edi
10f5d0: c9 leave
10f5d1: c3 ret
0010f1a4 <IMFS_evaluate_permission>:
*/
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
10f1a4: 55 push %ebp
10f1a5: 89 e5 mov %esp,%ebp
10f1a7: 57 push %edi
10f1a8: 56 push %esi
10f1a9: 53 push %ebx
10f1aa: 83 ec 0c sub $0xc,%esp
10f1ad: 8b 75 0c mov 0xc(%ebp),%esi
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
10f1b0: f7 c6 f8 ff ff ff test $0xfffffff8,%esi
10f1b6: 75 44 jne 10f1fc <IMFS_evaluate_permission+0x58><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
10f1b8: 8b 45 08 mov 0x8(%ebp),%eax
10f1bb: 8b 18 mov (%eax),%ebx
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
10f1bd: e8 1a 0c 00 00 call 10fddc <geteuid>
10f1c2: 89 c7 mov %eax,%edi
st_gid = getegid();
10f1c4: e8 03 0c 00 00 call 10fdcc <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
10f1c9: 66 39 7b 3c cmp %di,0x3c(%ebx)
10f1cd: 74 1d je 10f1ec <IMFS_evaluate_permission+0x48>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
10f1cf: 66 39 43 3e cmp %ax,0x3e(%ebx)
10f1d3: 74 1f je 10f1f4 <IMFS_evaluate_permission+0x50><== 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 )
10f1d5: 8b 43 30 mov 0x30(%ebx),%eax
10f1d8: 21 f0 and %esi,%eax
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
10f1da: 39 c6 cmp %eax,%esi
10f1dc: 0f 94 c0 sete %al
10f1df: 0f b6 c0 movzbl %al,%eax
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
10f1e2: 83 c4 0c add $0xc,%esp
10f1e5: 5b pop %ebx
10f1e6: 5e pop %esi
10f1e7: 5f pop %edi
10f1e8: c9 leave
10f1e9: c3 ret
10f1ea: 66 90 xchg %ax,%ax
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
10f1ec: c1 e6 06 shl $0x6,%esi
10f1ef: eb e4 jmp 10f1d5 <IMFS_evaluate_permission+0x31>
10f1f1: 8d 76 00 lea 0x0(%esi),%esi
else if ( st_gid == jnode->st_gid )
flags_to_test <<= 3;
10f1f4: c1 e6 03 shl $0x3,%esi
10f1f7: eb dc jmp 10f1d5 <IMFS_evaluate_permission+0x31>
10f1f9: 8d 76 00 lea 0x0(%esi),%esi
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
10f1fc: e8 e3 40 00 00 call 1132e4 <__errno> <== NOT EXECUTED
10f201: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10f207: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10f20c: eb d4 jmp 10f1e2 <IMFS_evaluate_permission+0x3e><== NOT EXECUTED
0010f4ac <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
10f4ac: 55 push %ebp
10f4ad: 89 e5 mov %esp,%ebp
10f4af: 57 push %edi
10f4b0: 56 push %esi
10f4b1: 53 push %ebx
10f4b2: 83 ec 20 sub $0x20,%esp
10f4b5: 8b 5d 08 mov 0x8(%ebp),%ebx
10f4b8: 8b 75 0c mov 0xc(%ebp),%esi
IMFS_jnode_t *jnode = node->node_access;
10f4bb: 8b 3b mov (%ebx),%edi
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
10f4bd: 8b 47 08 mov 0x8(%edi),%eax
10f4c0: 89 03 mov %eax,(%ebx)
rtems_filesystem_get_sym_start_loc(
10f4c2: 53 push %ebx
10f4c3: 8d 45 e4 lea -0x1c(%ebp),%eax
10f4c6: 50 push %eax
10f4c7: ff 77 50 pushl 0x50(%edi)
10f4ca: e8 f9 0d 00 00 call 1102c8 <rtems_filesystem_get_sym_start_loc>
);
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
10f4cf: 8b 57 50 mov 0x50(%edi),%edx
10f4d2: 03 55 e4 add -0x1c(%ebp),%edx
10f4d5: 31 c0 xor %eax,%eax
10f4d7: b9 ff ff ff ff mov $0xffffffff,%ecx
10f4dc: 89 d7 mov %edx,%edi
10f4de: f2 ae repnz scas %es:(%edi),%al
10f4e0: f7 d1 not %ecx
10f4e2: 49 dec %ecx
10f4e3: 53 push %ebx
10f4e4: 56 push %esi
10f4e5: 51 push %ecx
10f4e6: 52 push %edx
10f4e7: e8 68 fd ff ff call 10f254 <IMFS_eval_path>
10f4ec: 89 c7 mov %eax,%edi
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
10f4ee: 83 c4 14 add $0x14,%esp
10f4f1: 53 push %ebx
10f4f2: e8 51 fc ff ff call 10f148 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
10f4f7: 58 pop %eax
10f4f8: 5a pop %edx
10f4f9: 56 push %esi
10f4fa: 53 push %ebx
10f4fb: e8 a4 fc ff ff call 10f1a4 <IMFS_evaluate_permission>
10f500: 83 c4 10 add $0x10,%esp
10f503: 85 c0 test %eax,%eax
10f505: 74 0d je 10f514 <IMFS_evaluate_sym_link+0x68>
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
10f507: 89 f8 mov %edi,%eax
10f509: 8d 65 f4 lea -0xc(%ebp),%esp
10f50c: 5b pop %ebx
10f50d: 5e pop %esi
10f50e: 5f pop %edi
10f50f: c9 leave
10f510: c3 ret
10f511: 8d 76 00 lea 0x0(%esi),%esi
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
10f514: e8 cb 3d 00 00 call 1132e4 <__errno>
10f519: c7 00 0d 00 00 00 movl $0xd,(%eax)
10f51f: bf ff ff ff ff mov $0xffffffff,%edi
10f524: eb e1 jmp 10f507 <IMFS_evaluate_sym_link+0x5b>
00112a64 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
112a64: 55 push %ebp
112a65: 89 e5 mov %esp,%ebp
112a67: 53 push %ebx
112a68: 83 ec 14 sub $0x14,%esp
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
112a6b: 8b 45 08 mov 0x8(%ebp),%eax
112a6e: 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();
112a70: e8 67 d3 ff ff call 10fddc <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
112a75: 66 39 43 3c cmp %ax,0x3c(%ebx)
112a79: 74 05 je 112a80 <IMFS_fchmod+0x1c>
112a7b: 66 85 c0 test %ax,%ax
112a7e: 75 34 jne 112ab4 <IMFS_fchmod+0x50> <== ALWAYS TAKEN
/*
* 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);
112a80: 8b 45 0c mov 0xc(%ebp),%eax
112a83: 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);
112a88: 8b 53 30 mov 0x30(%ebx),%edx
112a8b: 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);
112a91: 09 d0 or %edx,%eax
112a93: 89 43 30 mov %eax,0x30(%ebx)
IMFS_update_ctime( jnode );
112a96: 83 ec 08 sub $0x8,%esp
112a99: 6a 00 push $0x0
112a9b: 8d 45 f0 lea -0x10(%ebp),%eax
112a9e: 50 push %eax
112a9f: e8 ac 56 ff ff call 108150 <gettimeofday>
112aa4: 8b 45 f0 mov -0x10(%ebp),%eax
112aa7: 89 43 48 mov %eax,0x48(%ebx)
return 0;
112aaa: 83 c4 10 add $0x10,%esp
112aad: 31 c0 xor %eax,%eax
}
112aaf: 8b 5d fc mov -0x4(%ebp),%ebx
112ab2: c9 leave
112ab3: 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 );
112ab4: e8 2b 08 00 00 call 1132e4 <__errno>
112ab9: c7 00 01 00 00 00 movl $0x1,(%eax)
112abf: b8 ff ff ff ff mov $0xffffffff,%eax
112ac4: eb e9 jmp 112aaf <IMFS_fchmod+0x4b>
00108aa4 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
108aa4: 55 push %ebp
108aa5: 89 e5 mov %esp,%ebp
108aa7: 53 push %ebx
108aa8: 83 ec 04 sub $0x4,%esp
108aab: 8b 45 08 mov 0x8(%ebp),%eax
108aae: 8b 55 0c mov 0xc(%ebp),%edx
108ab1: 8b 4d 10 mov 0x10(%ebp),%ecx
int err;
if (command == FIONBIO) {
108ab4: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx
108aba: 74 1c je 108ad8 <IMFS_fifo_ioctl+0x34>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
108abc: 50 push %eax
108abd: 51 push %ecx
108abe: 52 push %edx
108abf: 8b 40 18 mov 0x18(%eax),%eax
108ac2: ff 70 50 pushl 0x50(%eax)
108ac5: e8 56 98 00 00 call 112320 <pipe_ioctl>
IMFS_FIFO_RETURN(err);
108aca: 83 c4 10 add $0x10,%esp
108acd: 85 c0 test %eax,%eax
108acf: 78 3e js 108b0f <IMFS_fifo_ioctl+0x6b>
}
108ad1: 8b 5d fc mov -0x4(%ebp),%ebx
108ad4: c9 leave
108ad5: c3 ret
108ad6: 66 90 xchg %ax,%ax
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
108ad8: 85 c9 test %ecx,%ecx
108ada: 74 20 je 108afc <IMFS_fifo_ioctl+0x58>
err = -EFAULT;
else {
if (*(int *)buffer)
108adc: 8b 11 mov (%ecx),%edx
108ade: 85 d2 test %edx,%edx
108ae0: 74 0e je 108af0 <IMFS_fifo_ioctl+0x4c>
iop->flags |= LIBIO_FLAGS_NO_DELAY;
108ae2: 83 48 14 01 orl $0x1,0x14(%eax)
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
108ae6: 31 c0 xor %eax,%eax
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
108ae8: 8b 5d fc mov -0x4(%ebp),%ebx
108aeb: c9 leave
108aec: c3 ret
108aed: 8d 76 00 lea 0x0(%esi),%esi
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
108af0: 83 60 14 fe andl $0xfffffffe,0x14(%eax)
return 0;
108af4: 31 c0 xor %eax,%eax
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
108af6: 8b 5d fc mov -0x4(%ebp),%ebx
108af9: c9 leave
108afa: c3 ret
108afb: 90 nop
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
108afc: bb 0e 00 00 00 mov $0xe,%ebx
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
108b01: e8 c2 c9 00 00 call 1154c8 <__errno>
108b06: 89 18 mov %ebx,(%eax)
108b08: b8 ff ff ff ff mov $0xffffffff,%eax
108b0d: eb c2 jmp 108ad1 <IMFS_fifo_ioctl+0x2d>
108b0f: 89 c3 mov %eax,%ebx
108b11: f7 db neg %ebx
108b13: eb ec jmp 108b01 <IMFS_fifo_ioctl+0x5d>
00108a60 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
108a60: 55 push %ebp
108a61: 89 e5 mov %esp,%ebp
108a63: 53 push %ebx
108a64: 83 ec 10 sub $0x10,%esp
108a67: 8b 45 08 mov 0x8(%ebp),%eax
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
108a6a: 50 push %eax
108a6b: ff 75 14 pushl 0x14(%ebp)
108a6e: ff 75 10 pushl 0x10(%ebp)
108a71: ff 75 0c pushl 0xc(%ebp)
108a74: 8b 40 18 mov 0x18(%eax),%eax
108a77: ff 70 50 pushl 0x50(%eax)
108a7a: e8 01 99 00 00 call 112380 <pipe_lseek>
108a7f: 89 c3 mov %eax,%ebx
108a81: 99 cltd
IMFS_FIFO_RETURN(err);
108a82: 83 c4 20 add $0x20,%esp
108a85: 85 d2 test %edx,%edx
108a87: 78 05 js 108a8e <IMFS_fifo_lseek+0x2e> <== ALWAYS TAKEN
}
108a89: 8b 5d fc mov -0x4(%ebp),%ebx
108a8c: c9 leave
108a8d: c3 ret
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
108a8e: e8 35 ca 00 00 call 1154c8 <__errno>
108a93: f7 db neg %ebx
108a95: 89 18 mov %ebx,(%eax)
108a97: b8 ff ff ff ff mov $0xffffffff,%eax
108a9c: ba ff ff ff ff mov $0xffffffff,%edx
108aa1: eb e6 jmp 108a89 <IMFS_fifo_lseek+0x29>
00108b18 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
108b18: 55 push %ebp
108b19: 89 e5 mov %esp,%ebp
108b1b: 56 push %esi
108b1c: 53 push %ebx
108b1d: 83 ec 10 sub $0x10,%esp
108b20: 8b 45 08 mov 0x8(%ebp),%eax
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
108b23: 8b 58 18 mov 0x18(%eax),%ebx
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
108b26: 50 push %eax
108b27: ff 75 10 pushl 0x10(%ebp)
108b2a: ff 75 0c pushl 0xc(%ebp)
108b2d: ff 73 50 pushl 0x50(%ebx)
108b30: e8 eb 95 00 00 call 112120 <pipe_write>
108b35: 89 c6 mov %eax,%esi
if (err > 0) {
108b37: 83 c4 10 add $0x10,%esp
108b3a: 83 f8 00 cmp $0x0,%eax
108b3d: 7e 25 jle 108b64 <IMFS_fifo_write+0x4c>
IMFS_mtime_ctime_update(jnode);
108b3f: 83 ec 08 sub $0x8,%esp
108b42: 6a 00 push $0x0
108b44: 8d 45 f0 lea -0x10(%ebp),%eax
108b47: 50 push %eax
108b48: e8 3f 0f 00 00 call 109a8c <gettimeofday>
108b4d: 8b 45 f0 mov -0x10(%ebp),%eax
108b50: 89 43 44 mov %eax,0x44(%ebx)
108b53: 89 43 48 mov %eax,0x48(%ebx)
108b56: 83 c4 10 add $0x10,%esp
108b59: 89 f0 mov %esi,%eax
}
IMFS_FIFO_RETURN(err);
}
108b5b: 8d 65 f8 lea -0x8(%ebp),%esp
108b5e: 5b pop %ebx
108b5f: 5e pop %esi
108b60: c9 leave
108b61: c3 ret
108b62: 66 90 xchg %ax,%ax
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
108b64: 75 09 jne 108b6f <IMFS_fifo_write+0x57> <== ALWAYS TAKEN
108b66: 31 c0 xor %eax,%eax
}
108b68: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
108b6b: 5b pop %ebx <== NOT EXECUTED
108b6c: 5e pop %esi <== NOT EXECUTED
108b6d: c9 leave <== NOT EXECUTED
108b6e: c3 ret <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
108b6f: e8 54 c9 00 00 call 1154c8 <__errno>
108b74: f7 de neg %esi
108b76: 89 30 mov %esi,(%eax)
108b78: b8 ff ff ff ff mov $0xffffffff,%eax
108b7d: eb dc jmp 108b5b <IMFS_fifo_write+0x43>
0010f938 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
10f938: 55 push %ebp
10f939: 89 e5 mov %esp,%ebp
10f93b: 57 push %edi
10f93c: 56 push %esi
10f93d: 53 push %ebx
10f93e: 83 ec 0c sub $0xc,%esp
10f941: 8b 45 08 mov 0x8(%ebp),%eax
10f944: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
10f947: bf b0 18 12 00 mov $0x1218b0,%edi
10f94c: b9 02 00 00 00 mov $0x2,%ecx
10f951: 89 de mov %ebx,%esi
10f953: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10f955: 74 13 je 10f96a <IMFS_find_match_in_dir+0x32><== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
10f957: bf b2 18 12 00 mov $0x1218b2,%edi
10f95c: b9 03 00 00 00 mov $0x3,%ecx
10f961: 89 de mov %ebx,%esi
10f963: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10f965: 75 0d jne 10f974 <IMFS_find_match_in_dir+0x3c><== ALWAYS TAKEN
return directory->Parent;
10f967: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
10f96a: 8d 65 f4 lea -0xc(%ebp),%esp
10f96d: 5b pop %ebx
10f96e: 5e pop %esi
10f96f: 5f pop %edi
10f970: c9 leave
10f971: c3 ret
10f972: 66 90 xchg %ax,%ax
10f974: 8b 70 50 mov 0x50(%eax),%esi
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
10f977: 8d 78 54 lea 0x54(%eax),%edi
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
10f97a: 39 fe cmp %edi,%esi
10f97c: 75 08 jne 10f986 <IMFS_find_match_in_dir+0x4e>
10f97e: eb 20 jmp 10f9a0 <IMFS_find_match_in_dir+0x68>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
10f980: 8b 36 mov (%esi),%esi
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = rtems_chain_first( the_chain );
10f982: 39 fe cmp %edi,%esi
10f984: 74 1a je 10f9a0 <IMFS_find_match_in_dir+0x68>
!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 ) )
10f986: 8d 46 0c lea 0xc(%esi),%eax
10f989: 83 ec 08 sub $0x8,%esp
10f98c: 50 push %eax
10f98d: 53 push %ebx
10f98e: e8 c9 45 00 00 call 113f5c <strcmp>
10f993: 83 c4 10 add $0x10,%esp
10f996: 85 c0 test %eax,%eax
10f998: 75 e6 jne 10f980 <IMFS_find_match_in_dir+0x48>
for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
10f99a: 89 f0 mov %esi,%eax
10f99c: eb cc jmp 10f96a <IMFS_find_match_in_dir+0x32>
10f99e: 66 90 xchg %ax,%ax
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
10f9a0: 31 c0 xor %eax,%eax
10f9a2: eb c6 jmp 10f96a <IMFS_find_match_in_dir+0x32>
0010f898 <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
)
{
10f898: 55 push %ebp
10f899: 89 e5 mov %esp,%ebp
10f89b: 57 push %edi
10f89c: 56 push %esi
10f89d: 53 push %ebx
10f89e: 83 ec 3c sub $0x3c,%esp
10f8a1: 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;
10f8a4: 8b 58 1c mov 0x1c(%eax),%ebx
loc = temp_mt_entry->mt_fs_root;
10f8a7: 8d 55 d4 lea -0x2c(%ebp),%edx
10f8aa: 89 55 c4 mov %edx,-0x3c(%ebp)
10f8ad: 8d 70 1c lea 0x1c(%eax),%esi
10f8b0: b9 05 00 00 00 mov $0x5,%ecx
10f8b5: 89 d7 mov %edx,%edi
10f8b7: 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;
10f8b9: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
do {
next = jnode->Parent;
10f8c0: 8b 73 08 mov 0x8(%ebx),%esi
loc.node_access = (void *)jnode;
10f8c3: 89 5d d4 mov %ebx,-0x2c(%ebp)
IMFS_Set_handlers( &loc );
10f8c6: 83 ec 0c sub $0xc,%esp
10f8c9: 8d 45 d4 lea -0x2c(%ebp),%eax
10f8cc: 50 push %eax
10f8cd: e8 76 f8 ff ff call 10f148 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
10f8d2: 83 c4 10 add $0x10,%esp
10f8d5: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10f8d9: 75 31 jne 10f90c <IMFS_fsunmount+0x74>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10f8db: 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 ) ) {
10f8de: 39 43 50 cmp %eax,0x50(%ebx)
10f8e1: 74 42 je 10f925 <IMFS_fsunmount+0x8d>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
10f8e3: 85 db test %ebx,%ebx
10f8e5: 74 19 je 10f900 <IMFS_fsunmount+0x68>
if ( jnode->type == IMFS_DIRECTORY ) {
10f8e7: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx)
10f8eb: 75 d3 jne 10f8c0 <IMFS_fsunmount+0x28> <== NEVER TAKEN
}
}
} while (jnode != NULL);
return 0;
}
10f8ed: 8b 43 50 mov 0x50(%ebx),%eax
10f8f0: 8d 53 54 lea 0x54(%ebx),%edx
return -1;
jnode = next;
}
if ( jnode != NULL ) {
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
10f8f3: 39 d0 cmp %edx,%eax
10f8f5: 74 c9 je 10f8c0 <IMFS_fsunmount+0x28>
jnode = jnode_get_first_child( jnode );
10f8f7: 89 c3 mov %eax,%ebx
}
}
} while (jnode != NULL);
10f8f9: 85 c0 test %eax,%eax
10f8fb: 75 c3 jne 10f8c0 <IMFS_fsunmount+0x28> <== ALWAYS TAKEN
10f8fd: 8d 76 00 lea 0x0(%esi),%esi
return 0;
10f900: 31 c0 xor %eax,%eax
}
10f902: 8d 65 f4 lea -0xc(%ebp),%esp
10f905: 5b pop %ebx
10f906: 5e pop %esi
10f907: 5f pop %edi
10f908: c9 leave
10f909: c3 ret
10f90a: 66 90 xchg %ax,%ax
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( NULL, &loc );
10f90c: 83 ec 08 sub $0x8,%esp
10f90f: 8d 55 d4 lea -0x2c(%ebp),%edx
10f912: 52 push %edx
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
10f913: 6a 00 push $0x0
10f915: e8 02 83 ff ff call 107c1c <IMFS_unlink>
if (result != 0)
10f91a: 83 c4 10 add $0x10,%esp
10f91d: 85 c0 test %eax,%eax
10f91f: 75 0d jne 10f92e <IMFS_fsunmount+0x96> <== NEVER TAKEN
return -1;
jnode = next;
10f921: 89 f3 mov %esi,%ebx
10f923: eb be jmp 10f8e3 <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 );
10f925: 83 ec 08 sub $0x8,%esp
10f928: 8d 45 d4 lea -0x2c(%ebp),%eax
10f92b: 50 push %eax
10f92c: eb e5 jmp 10f913 <IMFS_fsunmount+0x7b>
if (result != 0)
return -1;
10f92e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10f933: eb cd jmp 10f902 <IMFS_fsunmount+0x6a> <== NOT EXECUTED
0010f9a4 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
10f9a4: 55 push %ebp
10f9a5: 89 e5 mov %esp,%ebp
10f9a7: 57 push %edi
10f9a8: 56 push %esi
10f9a9: 53 push %ebx
10f9aa: 83 ec 1c sub $0x1c,%esp
10f9ad: 8b 7d 08 mov 0x8(%ebp),%edi
10f9b0: 8b 5d 10 mov 0x10(%ebp),%ebx
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
10f9b3: 8a 17 mov (%edi),%dl
int pathlen,
char *token,
int *token_len
)
{
register int i = 0;
10f9b5: 31 f6 xor %esi,%esi
10f9b7: 89 7d e4 mov %edi,-0x1c(%ebp)
10f9ba: 89 df mov %ebx,%edi
10f9bc: 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) ) {
10f9be: eb 07 jmp 10f9c7 <IMFS_get_token+0x23>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
10f9c0: 46 inc %esi
10f9c1: 8b 45 e4 mov -0x1c(%ebp),%eax
10f9c4: 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) ) {
10f9c7: 83 ec 0c sub $0xc,%esp
10f9ca: 0f be c3 movsbl %bl,%eax
10f9cd: 50 push %eax
10f9ce: e8 8d 95 ff ff call 108f60 <rtems_filesystem_is_separator>
10f9d3: 83 c4 10 add $0x10,%esp
10f9d6: 85 c0 test %eax,%eax
10f9d8: 75 1a jne 10f9f4 <IMFS_get_token+0x50>
10f9da: 3b 75 0c cmp 0xc(%ebp),%esi
10f9dd: 7d 15 jge 10f9f4 <IMFS_get_token+0x50>
token[i] = c;
10f9df: 88 1c 37 mov %bl,(%edi,%esi,1)
if ( i == IMFS_NAME_MAX )
10f9e2: 83 fe 20 cmp $0x20,%esi
10f9e5: 75 d9 jne 10f9c0 <IMFS_get_token+0x1c>
return IMFS_INVALID_TOKEN;
10f9e7: b8 04 00 00 00 mov $0x4,%eax
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
10f9ec: 8d 65 f4 lea -0xc(%ebp),%esp
10f9ef: 5b pop %ebx
10f9f0: 5e pop %esi
10f9f1: 5f pop %edi
10f9f2: c9 leave
10f9f3: c3 ret
10f9f4: 88 da mov %bl,%dl
10f9f6: 89 fb mov %edi,%ebx
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
10f9f8: 85 f6 test %esi,%esi
10f9fa: 75 25 jne 10fa21 <IMFS_get_token+0x7d>
token[i] = c;
10f9fc: 88 17 mov %dl,(%edi)
if ( (token[i] != '\0') && pathlen ) {
10f9fe: 84 d2 test %dl,%dl
10fa00: 74 16 je 10fa18 <IMFS_get_token+0x74>
10fa02: 8b 45 0c mov 0xc(%ebp),%eax
10fa05: 85 c0 test %eax,%eax
10fa07: 74 0f je 10fa18 <IMFS_get_token+0x74>
i++;
type = IMFS_CURRENT_DIR;
10fa09: b8 01 00 00 00 mov $0x1,%eax
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
10fa0e: be 01 00 00 00 mov $0x1,%esi
10fa13: eb 05 jmp 10fa1a <IMFS_get_token+0x76>
10fa15: 8d 76 00 lea 0x0(%esi),%esi
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
10fa18: 31 c0 xor %eax,%eax
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
10fa1a: 8b 55 14 mov 0x14(%ebp),%edx
10fa1d: 89 32 mov %esi,(%edx)
10fa1f: eb cb jmp 10f9ec <IMFS_get_token+0x48>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
10fa21: 80 7c 37 ff 00 cmpb $0x0,-0x1(%edi,%esi,1)
10fa26: 74 04 je 10fa2c <IMFS_get_token+0x88> <== NEVER TAKEN
token[i] = '\0';
10fa28: c6 04 37 00 movb $0x0,(%edi,%esi,1)
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
10fa2c: 8b 45 14 mov 0x14(%ebp),%eax
10fa2f: 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 )
10fa31: bf b5 18 12 00 mov $0x1218b5,%edi
10fa36: b9 03 00 00 00 mov $0x3,%ecx
10fa3b: 89 de mov %ebx,%esi
10fa3d: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10fa3f: 75 0f jne 10fa50 <IMFS_get_token+0xac>
type = IMFS_UP_DIR;
10fa41: b8 02 00 00 00 mov $0x2,%eax
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
10fa46: 8d 65 f4 lea -0xc(%ebp),%esp
10fa49: 5b pop %ebx
10fa4a: 5e pop %esi
10fa4b: 5f pop %edi
10fa4c: c9 leave
10fa4d: c3 ret
10fa4e: 66 90 xchg %ax,%ax
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
10fa50: bf b6 18 12 00 mov $0x1218b6,%edi
10fa55: b9 02 00 00 00 mov $0x2,%ecx
10fa5a: 89 de mov %ebx,%esi
10fa5c: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10fa5e: 0f 97 c0 seta %al
10fa61: 0f 92 c2 setb %dl
10fa64: 28 d0 sub %dl,%al
10fa66: 0f be c0 movsbl %al,%eax
10fa69: 83 f8 01 cmp $0x1,%eax
10fa6c: 19 c0 sbb %eax,%eax
10fa6e: 83 e0 fe and $0xfffffffe,%eax
10fa71: 83 c0 03 add $0x3,%eax
type = IMFS_CURRENT_DIR;
}
return type;
}
10fa74: 8d 65 f4 lea -0xc(%ebp),%esp
10fa77: 5b pop %ebx
10fa78: 5e pop %esi
10fa79: 5f pop %edi
10fa7a: c9 leave
10fa7b: c3 ret
00107864 <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
)
{
107864: 55 push %ebp
107865: 89 e5 mov %esp,%ebp
107867: 57 push %edi
107868: 56 push %esi
107869: 53 push %ebx
10786a: 83 ec 1c sub $0x1c,%esp
10786d: 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,
107870: 8b 0d 30 3a 12 00 mov 0x123a30,%ecx
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
107876: 83 f9 10 cmp $0x10,%ecx
107879: 74 1f je 10789a <IMFS_initialize_support+0x36>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
10787b: 83 f9 0f cmp $0xf,%ecx
10787e: 7e 15 jle 107895 <IMFS_initialize_support+0x31>
107880: ba 05 00 00 00 mov $0x5,%edx
107885: b8 20 00 00 00 mov $0x20,%eax
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
10788a: 39 c1 cmp %eax,%ecx
10788c: 74 0c je 10789a <IMFS_initialize_support+0x36>
is_valid = true;
break;
}
if(bit_mask > requested_bytes_per_block)
10788e: 7c 05 jl 107895 <IMFS_initialize_support+0x31><== NEVER TAKEN
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
107890: d1 e0 shl %eax
107892: 4a dec %edx
107893: 75 f5 jne 10788a <IMFS_initialize_support+0x26><== ALWAYS TAKEN
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
107895: b9 80 00 00 00 mov $0x80,%ecx
break;
}
if(bit_mask > requested_bytes_per_block)
break;
}
*dest_bytes_per_block = ((is_valid)
10789a: 89 0d a0 79 12 00 mov %ecx,0x1279a0
/*
* 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();
1078a0: e8 6f 78 00 00 call 10f114 <IMFS_create_root_node>
1078a5: 89 c2 mov %eax,%edx
1078a7: 89 43 1c mov %eax,0x1c(%ebx)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
1078aa: 8b 45 14 mov 0x14(%ebp),%eax
1078ad: 89 43 24 mov %eax,0x24(%ebx)
temp_mt_entry->mt_fs_root.ops = op_table;
1078b0: 8b 45 0c mov 0xc(%ebp),%eax
1078b3: 89 43 28 mov %eax,0x28(%ebx)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
1078b6: 8d 7b 38 lea 0x38(%ebx),%edi
1078b9: be 60 18 12 00 mov $0x121860,%esi
1078be: b9 0c 00 00 00 mov $0xc,%ecx
1078c3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
1078c5: 83 ec 08 sub $0x8,%esp
1078c8: 6a 14 push $0x14
1078ca: 6a 01 push $0x1
1078cc: 89 55 e4 mov %edx,-0x1c(%ebp)
1078cf: e8 70 06 00 00 call 107f44 <calloc>
if ( !fs_info ) {
1078d4: 83 c4 10 add $0x10,%esp
1078d7: 85 c0 test %eax,%eax
1078d9: 8b 55 e4 mov -0x1c(%ebp),%edx
1078dc: 74 3c je 10791a <IMFS_initialize_support+0xb6>
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
1078de: 89 43 34 mov %eax,0x34(%ebx)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
1078e1: 8b 0d a4 79 12 00 mov 0x1279a4,%ecx
1078e7: 89 08 mov %ecx,(%eax)
1078e9: 41 inc %ecx
1078ea: 89 0d a4 79 12 00 mov %ecx,0x1279a4
fs_info->ino_count = 1;
1078f0: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
fs_info->memfile_handlers = memfile_handlers;
1078f7: 8b 4d 10 mov 0x10(%ebp),%ecx
1078fa: 89 48 08 mov %ecx,0x8(%eax)
fs_info->directory_handlers = directory_handlers;
1078fd: 8b 4d 14 mov 0x14(%ebp),%ecx
107900: 89 48 0c mov %ecx,0xc(%eax)
fs_info->fifo_handlers = fifo_handlers;
107903: 8b 4d 18 mov 0x18(%ebp),%ecx
107906: 89 48 10 mov %ecx,0x10(%eax)
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
107909: c7 42 38 01 00 00 00 movl $0x1,0x38(%edx)
return 0;
107910: 31 c0 xor %eax,%eax
}
107912: 8d 65 f4 lea -0xc(%ebp),%esp
107915: 5b pop %ebx
107916: 5e pop %esi
107917: 5f pop %edi
107918: c9 leave
107919: 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);
10791a: 83 ec 0c sub $0xc,%esp
10791d: 52 push %edx
10791e: e8 b1 07 00 00 call 1080d4 <free>
rtems_set_errno_and_return_minus_one(ENOMEM);
107923: e8 bc b9 00 00 call 1132e4 <__errno>
107928: c7 00 0c 00 00 00 movl $0xc,(%eax)
10792e: 83 c4 10 add $0x10,%esp
107931: 83 c8 ff or $0xffffffff,%eax
107934: eb dc jmp 107912 <IMFS_initialize_support+0xae>
00107938 <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 */
)
{
107938: 55 push %ebp
107939: 89 e5 mov %esp,%ebp
10793b: 57 push %edi
10793c: 53 push %ebx
10793d: 83 ec 50 sub $0x50,%esp
107940: 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;
107943: 8b 45 08 mov 0x8(%ebp),%eax
107946: 8b 00 mov (%eax),%eax
107948: 89 45 d8 mov %eax,-0x28(%ebp)
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
10794b: 66 83 78 34 07 cmpw $0x7,0x34(%eax)
107950: 77 66 ja 1079b8 <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 );
107952: 31 c0 xor %eax,%eax
107954: b9 ff ff ff ff mov $0xffffffff,%ecx
107959: 89 d7 mov %edx,%edi
10795b: f2 ae repnz scas %es:(%edi),%al
10795d: f7 d1 not %ecx
10795f: 49 dec %ecx
107960: 8d 45 f4 lea -0xc(%ebp),%eax
107963: 50 push %eax
107964: 8d 5d b7 lea -0x49(%ebp),%ebx
107967: 53 push %ebx
107968: 51 push %ecx
107969: 52 push %edx
10796a: e8 35 80 00 00 call 10f9a4 <IMFS_get_token>
new_node = IMFS_create_node(
parent_loc,
IMFS_HARD_LINK,
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
10796f: 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(
107972: 89 04 24 mov %eax,(%esp)
107975: 68 ff a1 00 00 push $0xa1ff
10797a: 53 push %ebx
10797b: 6a 03 push $0x3
10797d: ff 75 0c pushl 0xc(%ebp)
107980: e8 57 76 00 00 call 10efdc <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
107985: 83 c4 20 add $0x20,%esp
107988: 85 c0 test %eax,%eax
10798a: 74 3e je 1079ca <IMFS_link+0x92>
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++;
10798c: 8b 45 d8 mov -0x28(%ebp),%eax
10798f: 66 ff 40 34 incw 0x34(%eax)
IMFS_update_ctime( info.hard_link.link_node );
107993: 83 ec 08 sub $0x8,%esp
107996: 6a 00 push $0x0
107998: 8d 45 ec lea -0x14(%ebp),%eax
10799b: 50 push %eax
10799c: e8 af 07 00 00 call 108150 <gettimeofday>
1079a1: 8b 55 ec mov -0x14(%ebp),%edx
1079a4: 8b 45 d8 mov -0x28(%ebp),%eax
1079a7: 89 50 48 mov %edx,0x48(%eax)
return 0;
1079aa: 83 c4 10 add $0x10,%esp
1079ad: 31 c0 xor %eax,%eax
}
1079af: 8d 65 f8 lea -0x8(%ebp),%esp
1079b2: 5b pop %ebx
1079b3: 5f pop %edi
1079b4: c9 leave
1079b5: c3 ret
1079b6: 66 90 xchg %ax,%ax
/*
* 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 );
1079b8: e8 27 b9 00 00 call 1132e4 <__errno>
1079bd: c7 00 1f 00 00 00 movl $0x1f,(%eax)
1079c3: b8 ff ff ff ff mov $0xffffffff,%eax
1079c8: eb e5 jmp 1079af <IMFS_link+0x77>
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
1079ca: e8 15 b9 00 00 call 1132e4 <__errno>
1079cf: c7 00 0c 00 00 00 movl $0xc,(%eax)
1079d5: b8 ff ff ff ff mov $0xffffffff,%eax
1079da: eb d3 jmp 1079af <IMFS_link+0x77>
00111e3c <IMFS_memfile_addblock>:
*/
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
111e3c: 55 push %ebp
111e3d: 89 e5 mov %esp,%ebp
111e3f: 53 push %ebx
111e40: 83 ec 08 sub $0x8,%esp
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Obtain the pointer for the specified block number
*/
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
111e43: 6a 01 push $0x1
111e45: ff 75 0c pushl 0xc(%ebp)
111e48: ff 75 08 pushl 0x8(%ebp)
111e4b: e8 28 fc ff ff call 111a78 <IMFS_memfile_get_block_pointer>
111e50: 89 c3 mov %eax,%ebx
if ( *block_entry_ptr )
111e52: 83 c4 10 add $0x10,%esp
111e55: 8b 00 mov (%eax),%eax
111e57: 85 c0 test %eax,%eax
111e59: 74 09 je 111e64 <IMFS_memfile_addblock+0x28>
return 0;
111e5b: 31 c0 xor %eax,%eax
if ( !memory )
return 1;
*block_entry_ptr = memory;
return 0;
}
111e5d: 8b 5d fc mov -0x4(%ebp),%ebx
111e60: c9 leave
111e61: c3 ret
111e62: 66 90 xchg %ax,%ax
return 0;
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
111e64: e8 eb fb ff ff call 111a54 <memfile_alloc_block>
if ( !memory )
111e69: 85 c0 test %eax,%eax
111e6b: 74 07 je 111e74 <IMFS_memfile_addblock+0x38>
return 1;
*block_entry_ptr = memory;
111e6d: 89 03 mov %eax,(%ebx)
return 0;
111e6f: 31 c0 xor %eax,%eax
111e71: eb ea jmp 111e5d <IMFS_memfile_addblock+0x21>
111e73: 90 nop
/*
* There is no memory for this block number so allocate it.
*/
memory = memfile_alloc_block();
if ( !memory )
return 1;
111e74: b8 01 00 00 00 mov $0x1,%eax
111e79: eb e2 jmp 111e5d <IMFS_memfile_addblock+0x21>
0011207c <IMFS_memfile_extend>:
*/
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
11207c: 55 push %ebp
11207d: 89 e5 mov %esp,%ebp
11207f: 57 push %edi
112080: 56 push %esi
112081: 53 push %ebx
112082: 83 ec 2c sub $0x2c,%esp
112085: 8b 5d 08 mov 0x8(%ebp),%ebx
112088: 8b 45 0c mov 0xc(%ebp),%eax
11208b: 8b 55 10 mov 0x10(%ebp),%edx
11208e: 89 45 d8 mov %eax,-0x28(%ebp)
112091: 89 55 dc mov %edx,-0x24(%ebp)
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
112094: a1 a0 79 12 00 mov 0x1279a0,%eax
112099: 89 c1 mov %eax,%ecx
11209b: c1 e9 02 shr $0x2,%ecx
11209e: 8d 51 01 lea 0x1(%ecx),%edx
1120a1: 0f af d1 imul %ecx,%edx
1120a4: 42 inc %edx
1120a5: 0f af d1 imul %ecx,%edx
1120a8: 4a dec %edx
1120a9: 0f af d0 imul %eax,%edx
1120ac: 31 c9 xor %ecx,%ecx
1120ae: 3b 4d dc cmp -0x24(%ebp),%ecx
1120b1: 7f 1a jg 1120cd <IMFS_memfile_extend+0x51><== NEVER TAKEN
1120b3: 7d 13 jge 1120c8 <IMFS_memfile_extend+0x4c><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
1120b5: e8 2a 12 00 00 call 1132e4 <__errno>
1120ba: c7 00 16 00 00 00 movl $0x16,(%eax)
1120c0: b8 ff ff ff ff mov $0xffffffff,%eax
1120c5: eb 19 jmp 1120e0 <IMFS_memfile_extend+0x64>
1120c7: 90 nop
IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE );
/*
* Verify new file size is supported
*/
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
1120c8: 3b 55 d8 cmp -0x28(%ebp),%edx
1120cb: 76 e8 jbe 1120b5 <IMFS_memfile_extend+0x39>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
1120cd: 8b 53 50 mov 0x50(%ebx),%edx
1120d0: 8b 4b 54 mov 0x54(%ebx),%ecx
1120d3: 89 55 e0 mov %edx,-0x20(%ebp)
1120d6: 89 4d e4 mov %ecx,-0x1c(%ebp)
1120d9: 39 4d dc cmp %ecx,-0x24(%ebp)
1120dc: 7d 0a jge 1120e8 <IMFS_memfile_extend+0x6c><== ALWAYS TAKEN
return 0;
1120de: 31 c0 xor %eax,%eax
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
1120e0: 8d 65 f4 lea -0xc(%ebp),%esp
1120e3: 5b pop %ebx
1120e4: 5e pop %esi
1120e5: 5f pop %edi
1120e6: c9 leave
1120e7: c3 ret
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Verify new file size is actually larger than current size
*/
if ( new_length <= the_jnode->info.file.size )
1120e8: 7f 05 jg 1120ef <IMFS_memfile_extend+0x73><== NEVER TAKEN
1120ea: 39 55 d8 cmp %edx,-0x28(%ebp)
1120ed: 76 ef jbe 1120de <IMFS_memfile_extend+0x62>
return 0;
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
1120ef: 89 45 d0 mov %eax,-0x30(%ebp)
1120f2: 89 c1 mov %eax,%ecx
1120f4: c1 f9 1f sar $0x1f,%ecx
1120f7: 89 4d d4 mov %ecx,-0x2c(%ebp)
1120fa: ff 75 d4 pushl -0x2c(%ebp)
1120fd: ff 75 d0 pushl -0x30(%ebp)
112100: ff 75 dc pushl -0x24(%ebp)
112103: ff 75 d8 pushl -0x28(%ebp)
112106: e8 e5 c9 00 00 call 11eaf0 <__divdi3>
11210b: 83 c4 10 add $0x10,%esp
11210e: 89 c6 mov %eax,%esi
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
112110: ff 75 d4 pushl -0x2c(%ebp)
112113: ff 75 d0 pushl -0x30(%ebp)
112116: ff 75 e4 pushl -0x1c(%ebp)
112119: ff 75 e0 pushl -0x20(%ebp)
11211c: e8 cf c9 00 00 call 11eaf0 <__divdi3>
112121: 83 c4 10 add $0x10,%esp
112124: 89 45 e0 mov %eax,-0x20(%ebp)
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
112127: 39 c6 cmp %eax,%esi
112129: 72 51 jb 11217c <IMFS_memfile_extend+0x100><== NEVER TAKEN
11212b: 89 c7 mov %eax,%edi
11212d: eb 06 jmp 112135 <IMFS_memfile_extend+0xb9>
11212f: 90 nop
112130: 47 inc %edi
112131: 39 fe cmp %edi,%esi
112133: 72 47 jb 11217c <IMFS_memfile_extend+0x100>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
112135: 83 ec 08 sub $0x8,%esp
112138: 57 push %edi
112139: 53 push %ebx
11213a: e8 fd fc ff ff call 111e3c <IMFS_memfile_addblock>
11213f: 83 c4 10 add $0x10,%esp
112142: 85 c0 test %eax,%eax
112144: 74 ea je 112130 <IMFS_memfile_extend+0xb4>
for ( ; block>=old_blocks ; block-- ) {
112146: 39 7d e0 cmp %edi,-0x20(%ebp)
112149: 77 17 ja 112162 <IMFS_memfile_extend+0xe6><== NEVER TAKEN
11214b: 8b 75 e0 mov -0x20(%ebp),%esi
11214e: 66 90 xchg %ax,%ax
IMFS_memfile_remove_block( the_jnode, block );
112150: 83 ec 08 sub $0x8,%esp
112153: 57 push %edi
112154: 53 push %ebx
112155: e8 f6 fe ff ff call 112050 <IMFS_memfile_remove_block>
/*
* 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-- ) {
11215a: 4f dec %edi
11215b: 83 c4 10 add $0x10,%esp
11215e: 39 fe cmp %edi,%esi
112160: 76 ee jbe 112150 <IMFS_memfile_extend+0xd4>
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
112162: e8 7d 11 00 00 call 1132e4 <__errno>
112167: c7 00 1c 00 00 00 movl $0x1c,(%eax)
11216d: b8 ff ff ff ff mov $0xffffffff,%eax
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
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
11217a: 66 90 xchg %ax,%ax
}
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
11217c: 8b 45 d8 mov -0x28(%ebp),%eax
11217f: 8b 55 dc mov -0x24(%ebp),%edx
112182: 89 43 50 mov %eax,0x50(%ebx)
112185: 89 53 54 mov %edx,0x54(%ebx)
return 0;
112188: 31 c0 xor %eax,%eax
}
11218a: 8d 65 f4 lea -0xc(%ebp),%esp
11218d: 5b pop %ebx
11218e: 5e pop %esi
11218f: 5f pop %edi
112190: c9 leave
112191: c3 ret
00111a78 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
111a78: 55 push %ebp
111a79: 89 e5 mov %esp,%ebp
111a7b: 57 push %edi
111a7c: 56 push %esi
111a7d: 53 push %ebx
111a7e: 83 ec 1c sub $0x1c,%esp
111a81: 8b 5d 08 mov 0x8(%ebp),%ebx
111a84: 8b 75 0c mov 0xc(%ebp),%esi
111a87: 8b 7d 10 mov 0x10(%ebp),%edi
my_block = block;
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
111a8a: 8b 0d a0 79 12 00 mov 0x1279a0,%ecx
111a90: c1 e9 02 shr $0x2,%ecx
111a93: 8d 41 ff lea -0x1(%ecx),%eax
111a96: 39 c6 cmp %eax,%esi
111a98: 77 1a ja 111ab4 <IMFS_memfile_get_block_pointer+0x3c>
p = info->indirect;
111a9a: 8b 43 58 mov 0x58(%ebx),%eax
if ( malloc_it ) {
111a9d: 85 ff test %edi,%edi
111a9f: 74 53 je 111af4 <IMFS_memfile_get_block_pointer+0x7c>
if ( !p ) {
111aa1: 85 c0 test %eax,%eax
111aa3: 0f 84 b6 00 00 00 je 111b5f <IMFS_memfile_get_block_pointer+0xe7>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
111aa9: 8d 04 b0 lea (%eax,%esi,4),%eax
/*
* This means the requested block number is out of range.
*/
return 0;
}
111aac: 83 c4 1c add $0x1c,%esp
111aaf: 5b pop %ebx
111ab0: 5e pop %esi
111ab1: 5f pop %edi
111ab2: c9 leave
111ab3: c3 ret
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
111ab4: 8d 41 01 lea 0x1(%ecx),%eax
111ab7: 0f af c1 imul %ecx,%eax
111aba: 8d 50 ff lea -0x1(%eax),%edx
111abd: 39 d6 cmp %edx,%esi
111abf: 77 3b ja 111afc <IMFS_memfile_get_block_pointer+0x84>
my_block -= FIRST_DOUBLY_INDIRECT;
111ac1: 29 ce sub %ecx,%esi
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
111ac3: 89 f0 mov %esi,%eax
111ac5: 31 d2 xor %edx,%edx
111ac7: f7 f1 div %ecx
111ac9: 89 c6 mov %eax,%esi
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
111acb: 8b 43 5c mov 0x5c(%ebx),%eax
if ( malloc_it ) {
111ace: 85 ff test %edi,%edi
111ad0: 74 7e je 111b50 <IMFS_memfile_get_block_pointer+0xd8>
if ( !p ) {
111ad2: 85 c0 test %eax,%eax
111ad4: 0f 84 96 00 00 00 je 111b70 <IMFS_memfile_get_block_pointer+0xf8>
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
111ada: 8d 1c b0 lea (%eax,%esi,4),%ebx
111add: 8b 03 mov (%ebx),%eax
if ( !p1 ) {
111adf: 85 c0 test %eax,%eax
111ae1: 0f 84 a4 00 00 00 je 111b8b <IMFS_memfile_get_block_pointer+0x113>
p = (block_p *)p[ doubly ];
if ( !p )
return 0;
return (block_p *)&p[ singly ];
111ae7: 8d 04 90 lea (%eax,%edx,4),%eax
/*
* This means the requested block number is out of range.
*/
return 0;
}
111aea: 83 c4 1c add $0x1c,%esp
111aed: 5b pop %ebx
111aee: 5e pop %esi
111aef: 5f pop %edi
111af0: c9 leave
111af1: c3 ret
111af2: 66 90 xchg %ax,%ax
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
111af4: 85 c0 test %eax,%eax
111af6: 75 b1 jne 111aa9 <IMFS_memfile_get_block_pointer+0x31><== ALWAYS TAKEN
if ( !p )
return 0;
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
111af8: 31 c0 xor %eax,%eax
111afa: eb ee jmp 111aea <IMFS_memfile_get_block_pointer+0x72><== NOT EXECUTED
}
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
111afc: 8d 50 01 lea 0x1(%eax),%edx
111aff: 0f af d1 imul %ecx,%edx
111b02: 4a dec %edx
111b03: 39 d6 cmp %edx,%esi
111b05: 77 f1 ja 111af8 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
111b07: 29 c6 sub %eax,%esi
111b09: 89 f0 mov %esi,%eax
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
111b0b: 31 d2 xor %edx,%edx
111b0d: f7 f1 div %ecx
111b0f: 89 55 e4 mov %edx,-0x1c(%ebp)
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
111b12: 31 d2 xor %edx,%edx
111b14: f7 f1 div %ecx
111b16: 89 c6 mov %eax,%esi
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
111b18: 8b 4b 60 mov 0x60(%ebx),%ecx
if ( malloc_it ) {
111b1b: 85 ff test %edi,%edi
111b1d: 0f 84 82 00 00 00 je 111ba5 <IMFS_memfile_get_block_pointer+0x12d>
if ( !p ) {
111b23: 85 c9 test %ecx,%ecx
111b25: 0f 84 9b 00 00 00 je 111bc6 <IMFS_memfile_get_block_pointer+0x14e>
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
111b2b: 8d 1c b1 lea (%ecx,%esi,4),%ebx
111b2e: 8b 0b mov (%ebx),%ecx
if ( !p1 ) {
111b30: 85 c9 test %ecx,%ecx
111b32: 0f 84 c5 00 00 00 je 111bfd <IMFS_memfile_get_block_pointer+0x185>
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
111b38: 8d 1c 91 lea (%ecx,%edx,4),%ebx
111b3b: 8b 13 mov (%ebx),%edx
if ( !p2 ) {
111b3d: 85 d2 test %edx,%edx
111b3f: 0f 84 a0 00 00 00 je 111be5 <IMFS_memfile_get_block_pointer+0x16d>
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
111b45: 8b 4d e4 mov -0x1c(%ebp),%ecx
111b48: 8d 04 8a lea (%edx,%ecx,4),%eax
111b4b: eb 9d jmp 111aea <IMFS_memfile_get_block_pointer+0x72>
111b4d: 8d 76 00 lea 0x0(%esi),%esi
}
return (block_p *)&p1[ singly ];
}
if ( !p )
111b50: 85 c0 test %eax,%eax
111b52: 74 a4 je 111af8 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
p = (block_p *)p[ doubly ];
111b54: 8b 04 b0 mov (%eax,%esi,4),%eax
if ( !p )
111b57: 85 c0 test %eax,%eax
111b59: 75 8c jne 111ae7 <IMFS_memfile_get_block_pointer+0x6f><== ALWAYS TAKEN
if ( !p )
return 0;
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
111b5b: 31 c0 xor %eax,%eax
111b5d: eb 8b jmp 111aea <IMFS_memfile_get_block_pointer+0x72><== NOT EXECUTED
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
111b5f: e8 f0 fe ff ff call 111a54 <memfile_alloc_block>
if ( !p )
111b64: 85 c0 test %eax,%eax
111b66: 74 90 je 111af8 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
info->indirect = p;
111b68: 89 43 58 mov %eax,0x58(%ebx)
111b6b: e9 39 ff ff ff jmp 111aa9 <IMFS_memfile_get_block_pointer+0x31>
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
111b70: 89 55 e0 mov %edx,-0x20(%ebp)
111b73: e8 dc fe ff ff call 111a54 <memfile_alloc_block>
if ( !p )
111b78: 85 c0 test %eax,%eax
111b7a: 8b 55 e0 mov -0x20(%ebp),%edx
111b7d: 0f 84 75 ff ff ff je 111af8 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
info->doubly_indirect = p;
111b83: 89 43 5c mov %eax,0x5c(%ebx)
111b86: e9 4f ff ff ff jmp 111ada <IMFS_memfile_get_block_pointer+0x62>
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
111b8b: 89 55 e0 mov %edx,-0x20(%ebp)
111b8e: e8 c1 fe ff ff call 111a54 <memfile_alloc_block>
if ( !p1 )
111b93: 85 c0 test %eax,%eax
111b95: 8b 55 e0 mov -0x20(%ebp),%edx
111b98: 0f 84 5a ff ff ff je 111af8 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
p[ doubly ] = (block_p) p1;
111b9e: 89 03 mov %eax,(%ebx)
111ba0: e9 42 ff ff ff jmp 111ae7 <IMFS_memfile_get_block_pointer+0x6f>
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
111ba5: 85 c9 test %ecx,%ecx
111ba7: 0f 84 4b ff ff ff je 111af8 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
p1 = (block_p *) p[ triply ];
111bad: 8b 04 81 mov (%ecx,%eax,4),%eax
if ( !p1 )
111bb0: 85 c0 test %eax,%eax
111bb2: 0f 84 40 ff ff ff je 111af8 <IMFS_memfile_get_block_pointer+0x80><== NEVER TAKEN
return 0;
p2 = (block_p *)p1[ doubly ];
111bb8: 8b 14 90 mov (%eax,%edx,4),%edx
if ( !p2 )
return 0;
111bbb: 31 c0 xor %eax,%eax
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
111bbd: 85 d2 test %edx,%edx
111bbf: 75 84 jne 111b45 <IMFS_memfile_get_block_pointer+0xcd><== ALWAYS TAKEN
111bc1: e9 24 ff ff ff jmp 111aea <IMFS_memfile_get_block_pointer+0x72><== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
111bc6: 89 55 e0 mov %edx,-0x20(%ebp)
111bc9: e8 86 fe ff ff call 111a54 <memfile_alloc_block>
111bce: 89 c1 mov %eax,%ecx
if ( !p )
return 0;
111bd0: 31 c0 xor %eax,%eax
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
if ( !p )
111bd2: 85 c9 test %ecx,%ecx
111bd4: 8b 55 e0 mov -0x20(%ebp),%edx
111bd7: 0f 84 0d ff ff ff je 111aea <IMFS_memfile_get_block_pointer+0x72><== NEVER TAKEN
return 0;
info->triply_indirect = p;
111bdd: 89 4b 60 mov %ecx,0x60(%ebx)
111be0: e9 46 ff ff ff jmp 111b2b <IMFS_memfile_get_block_pointer+0xb3>
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
111be5: e8 6a fe ff ff call 111a54 <memfile_alloc_block>
111bea: 89 c2 mov %eax,%edx
if ( !p2 )
return 0;
111bec: 31 c0 xor %eax,%eax
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
111bee: 85 d2 test %edx,%edx
111bf0: 0f 84 f4 fe ff ff je 111aea <IMFS_memfile_get_block_pointer+0x72><== NEVER TAKEN
return 0;
p1[ doubly ] = (block_p) p2;
111bf6: 89 13 mov %edx,(%ebx)
111bf8: e9 48 ff ff ff jmp 111b45 <IMFS_memfile_get_block_pointer+0xcd>
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
111bfd: 89 55 e0 mov %edx,-0x20(%ebp)
111c00: e8 4f fe ff ff call 111a54 <memfile_alloc_block>
111c05: 89 c1 mov %eax,%ecx
if ( !p1 )
return 0;
111c07: 31 c0 xor %eax,%eax
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
if ( !p1 )
111c09: 85 c9 test %ecx,%ecx
111c0b: 8b 55 e0 mov -0x20(%ebp),%edx
111c0e: 0f 84 d6 fe ff ff je 111aea <IMFS_memfile_get_block_pointer+0x72><== NEVER TAKEN
return 0;
p[ triply ] = (block_p) p1;
111c14: 89 0b mov %ecx,(%ebx)
111c16: e9 1d ff ff ff jmp 111b38 <IMFS_memfile_get_block_pointer+0xc0>
00111c1c <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
111c1c: 55 push %ebp
111c1d: 89 e5 mov %esp,%ebp
111c1f: 57 push %edi
111c20: 56 push %esi
111c21: 53 push %ebx
111c22: 83 ec 3c sub $0x3c,%esp
111c25: 8b 75 0c mov 0xc(%ebp),%esi
111c28: 8b 7d 10 mov 0x10(%ebp),%edi
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
111c2b: 8b 45 08 mov 0x8(%ebp),%eax
111c2e: 83 78 4c 06 cmpl $0x6,0x4c(%eax)
111c32: 0f 84 60 01 00 00 je 111d98 <IMFS_memfile_read+0x17c><== NEVER TAKEN
/*
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
111c38: 89 f0 mov %esi,%eax
if ( last_byte > the_jnode->info.file.size )
111c3a: 8b 55 08 mov 0x8(%ebp),%edx
111c3d: 8b 4a 50 mov 0x50(%edx),%ecx
/*
* 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;
111c40: 8b 5d 18 mov 0x18(%ebp),%ebx
111c43: 01 f3 add %esi,%ebx
111c45: 89 5d d0 mov %ebx,-0x30(%ebp)
if ( last_byte > the_jnode->info.file.size )
111c48: 31 d2 xor %edx,%edx
111c4a: 8b 5d 08 mov 0x8(%ebp),%ebx
111c4d: 3b 53 54 cmp 0x54(%ebx),%edx
111c50: 0f 8d d2 00 00 00 jge 111d28 <IMFS_memfile_read+0x10c><== ALWAYS TAKEN
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
111c56: 8b 45 18 mov 0x18(%ebp),%eax
111c59: 89 45 cc mov %eax,-0x34(%ebp)
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
111c5c: 8b 15 a0 79 12 00 mov 0x1279a0,%edx
111c62: 89 55 d0 mov %edx,-0x30(%ebp)
111c65: 89 d0 mov %edx,%eax
111c67: 99 cltd
111c68: 89 d3 mov %edx,%ebx
111c6a: 52 push %edx
111c6b: 50 push %eax
111c6c: 57 push %edi
111c6d: 56 push %esi
111c6e: 89 45 c0 mov %eax,-0x40(%ebp)
111c71: e8 c6 cf 00 00 call 11ec3c <__moddi3>
111c76: 83 c4 10 add $0x10,%esp
111c79: 89 45 c8 mov %eax,-0x38(%ebp)
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
111c7c: 8b 4d c0 mov -0x40(%ebp),%ecx
111c7f: 53 push %ebx
111c80: 51 push %ecx
111c81: 57 push %edi
111c82: 56 push %esi
111c83: e8 68 ce 00 00 call 11eaf0 <__divdi3>
111c88: 83 c4 10 add $0x10,%esp
111c8b: 89 c3 mov %eax,%ebx
if ( start_offset ) {
111c8d: 8b 7d c8 mov -0x38(%ebp),%edi
111c90: 85 ff test %edi,%edi
111c92: 0f 84 a0 00 00 00 je 111d38 <IMFS_memfile_read+0x11c>
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 );
111c98: 56 push %esi
111c99: 6a 00 push $0x0
111c9b: 50 push %eax
111c9c: ff 75 08 pushl 0x8(%ebp)
111c9f: e8 d4 fd ff ff call 111a78 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
111ca4: 83 c4 10 add $0x10,%esp
111ca7: 85 c0 test %eax,%eax
111ca9: 0f 84 65 01 00 00 je 111e14 <IMFS_memfile_read+0x1f8><== NEVER TAKEN
* 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 ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
111caf: 8b 4d d0 mov -0x30(%ebp),%ecx
111cb2: 2b 4d c8 sub -0x38(%ebp),%ecx
111cb5: 8b 55 cc mov -0x34(%ebp),%edx
111cb8: 39 ca cmp %ecx,%edx
111cba: 0f 87 3c 01 00 00 ja 111dfc <IMFS_memfile_read+0x1e0>
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 );
111cc0: 8b 75 c8 mov -0x38(%ebp),%esi
111cc3: 03 30 add (%eax),%esi
dest += to_copy;
111cc5: 8b 7d 14 mov 0x14(%ebp),%edi
111cc8: 89 d1 mov %edx,%ecx
111cca: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
111ccc: 89 7d c8 mov %edi,-0x38(%ebp)
block++;
111ccf: 43 inc %ebx
my_length -= to_copy;
111cd0: 29 55 cc sub %edx,-0x34(%ebp)
111cd3: a1 a0 79 12 00 mov 0x1279a0,%eax
111cd8: 89 45 d0 mov %eax,-0x30(%ebp)
copied += to_copy;
111cdb: 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 ) {
111cde: 8b 4d d0 mov -0x30(%ebp),%ecx
111ce1: 39 4d cc cmp %ecx,-0x34(%ebp)
111ce4: 73 24 jae 111d0a <IMFS_memfile_read+0xee>
111ce6: eb 60 jmp 111d48 <IMFS_memfile_read+0x12c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
111ce8: 8b 30 mov (%eax),%esi
111cea: 8b 7d c8 mov -0x38(%ebp),%edi
111ced: 8b 4d d0 mov -0x30(%ebp),%ecx
111cf0: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
dest += to_copy;
111cf2: 89 7d c8 mov %edi,-0x38(%ebp)
block++;
111cf5: 43 inc %ebx
my_length -= to_copy;
111cf6: 8b 7d d0 mov -0x30(%ebp),%edi
111cf9: 29 7d cc sub %edi,-0x34(%ebp)
copied += to_copy;
111cfc: 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 ) {
111cff: 8b 45 cc mov -0x34(%ebp),%eax
111d02: 39 05 a0 79 12 00 cmp %eax,0x1279a0
111d08: 77 3e ja 111d48 <IMFS_memfile_read+0x12c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
111d0a: 51 push %ecx
111d0b: 6a 00 push $0x0
111d0d: 53 push %ebx
111d0e: ff 75 08 pushl 0x8(%ebp)
111d11: e8 62 fd ff ff call 111a78 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
111d16: 83 c4 10 add $0x10,%esp
111d19: 85 c0 test %eax,%eax
111d1b: 75 cb jne 111ce8 <IMFS_memfile_read+0xcc><== ALWAYS TAKEN
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
111d1d: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
111d20: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
111d23: 5b pop %ebx <== NOT EXECUTED
111d24: 5e pop %esi <== NOT EXECUTED
111d25: 5f pop %edi <== NOT EXECUTED
111d26: c9 leave <== NOT EXECUTED
111d27: 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 )
111d28: 0f 8e be 00 00 00 jle 111dec <IMFS_memfile_read+0x1d0><== ALWAYS TAKEN
my_length = the_jnode->info.file.size - start;
111d2e: 29 c1 sub %eax,%ecx
111d30: 89 4d cc mov %ecx,-0x34(%ebp)
111d33: e9 24 ff ff ff jmp 111c5c <IMFS_memfile_read+0x40>
unsigned int last_byte;
unsigned int copied;
unsigned int start_offset;
unsigned char *dest;
dest = destination;
111d38: 8b 55 14 mov 0x14(%ebp),%edx
111d3b: 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;
111d3e: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
111d45: eb 97 jmp 111cde <IMFS_memfile_read+0xc2>
111d47: 90 nop
/*
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
111d48: 8b 55 cc mov -0x34(%ebp),%edx
111d4b: 85 d2 test %edx,%edx
111d4d: 74 23 je 111d72 <IMFS_memfile_read+0x156>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
111d4f: 50 push %eax
111d50: 6a 00 push $0x0
111d52: 53 push %ebx
111d53: ff 75 08 pushl 0x8(%ebp)
111d56: e8 1d fd ff ff call 111a78 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
111d5b: 83 c4 10 add $0x10,%esp
111d5e: 85 c0 test %eax,%eax
111d60: 74 bb je 111d1d <IMFS_memfile_read+0x101><== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
111d62: 8b 30 mov (%eax),%esi
111d64: 8b 7d c8 mov -0x38(%ebp),%edi
111d67: 8b 4d cc mov -0x34(%ebp),%ecx
111d6a: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
copied += my_length;
111d6c: 8b 55 cc mov -0x34(%ebp),%edx
111d6f: 01 55 c4 add %edx,-0x3c(%ebp)
}
IMFS_update_atime( the_jnode );
111d72: 83 ec 08 sub $0x8,%esp
111d75: 6a 00 push $0x0
111d77: 8d 45 e0 lea -0x20(%ebp),%eax
111d7a: 50 push %eax
111d7b: e8 d0 63 ff ff call 108150 <gettimeofday>
111d80: 8b 45 e0 mov -0x20(%ebp),%eax
111d83: 8b 4d 08 mov 0x8(%ebp),%ecx
111d86: 89 41 40 mov %eax,0x40(%ecx)
return copied;
111d89: 8b 45 c4 mov -0x3c(%ebp),%eax
111d8c: 83 c4 10 add $0x10,%esp
}
111d8f: 8d 65 f4 lea -0xc(%ebp),%esp
111d92: 5b pop %ebx
111d93: 5e pop %esi
111d94: 5f pop %edi
111d95: c9 leave
111d96: c3 ret
111d97: 90 nop
my_length = length;
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
111d98: 8b 50 58 mov 0x58(%eax),%edx
111d9b: 89 55 cc mov %edx,-0x34(%ebp)
if (my_length > (the_jnode->info.linearfile.size - start))
111d9e: 89 c1 mov %eax,%ecx
111da0: 8b 40 50 mov 0x50(%eax),%eax
111da3: 8b 51 54 mov 0x54(%ecx),%edx
111da6: 89 c1 mov %eax,%ecx
111da8: 89 d3 mov %edx,%ebx
111daa: 29 f1 sub %esi,%ecx
111dac: 19 fb sbb %edi,%ebx
111dae: 89 4d d0 mov %ecx,-0x30(%ebp)
111db1: 89 5d d4 mov %ebx,-0x2c(%ebp)
111db4: 31 c9 xor %ecx,%ecx
111db6: 39 d9 cmp %ebx,%ecx
111db8: 7d 4a jge 111e04 <IMFS_memfile_read+0x1e8><== ALWAYS TAKEN
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
my_length = length;
111dba: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
111dbd: 03 75 cc add -0x34(%ebp),%esi
111dc0: 8b 7d 14 mov 0x14(%ebp),%edi
111dc3: 89 d9 mov %ebx,%ecx
111dc5: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
IMFS_update_atime( the_jnode );
111dc7: 83 ec 08 sub $0x8,%esp
111dca: 6a 00 push $0x0
111dcc: 8d 45 e0 lea -0x20(%ebp),%eax
111dcf: 50 push %eax
111dd0: e8 7b 63 ff ff call 108150 <gettimeofday>
111dd5: 8b 45 e0 mov -0x20(%ebp),%eax
111dd8: 8b 7d 08 mov 0x8(%ebp),%edi
111ddb: 89 47 40 mov %eax,0x40(%edi)
return my_length;
111dde: 89 d8 mov %ebx,%eax
111de0: 83 c4 10 add $0x10,%esp
}
IMFS_update_atime( the_jnode );
return copied;
}
111de3: 8d 65 f4 lea -0xc(%ebp),%esp
111de6: 5b pop %ebx
111de7: 5e pop %esi
111de8: 5f pop %edi
111de9: c9 leave
111dea: c3 ret
111deb: 90 nop
/*
* 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 )
111dec: 39 4d d0 cmp %ecx,-0x30(%ebp)
111def: 0f 86 61 fe ff ff jbe 111c56 <IMFS_memfile_read+0x3a>
111df5: e9 34 ff ff ff jmp 111d2e <IMFS_memfile_read+0x112>
111dfa: 66 90 xchg %ax,%ax
* 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 ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
111dfc: 89 ca mov %ecx,%edx
111dfe: e9 bd fe ff ff jmp 111cc0 <IMFS_memfile_read+0xa4>
111e03: 90 nop
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))
111e04: 7f 08 jg 111e0e <IMFS_memfile_read+0x1f2><== NEVER TAKEN
111e06: 8b 5d d0 mov -0x30(%ebp),%ebx
111e09: 39 5d 18 cmp %ebx,0x18(%ebp)
111e0c: 76 ac jbe 111dba <IMFS_memfile_read+0x19e><== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
111e0e: 89 c3 mov %eax,%ebx
111e10: 29 f3 sub %esi,%ebx
111e12: eb a9 jmp 111dbd <IMFS_memfile_read+0x1a1>
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;
111e14: 31 c0 xor %eax,%eax
111e16: e9 05 ff ff ff jmp 111d20 <IMFS_memfile_read+0x104><== NOT EXECUTED
00111ef4 <IMFS_memfile_remove>:
* is better to stick to simple, easy to understand algorithms.
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
111ef4: 55 push %ebp
111ef5: 89 e5 mov %esp,%ebp
111ef7: 57 push %edi
111ef8: 56 push %esi
111ef9: 53 push %ebx
111efa: 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;
111efd: 8b 3d a0 79 12 00 mov 0x1279a0,%edi
111f03: c1 ef 02 shr $0x2,%edi
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
111f06: 8b 45 08 mov 0x8(%ebp),%eax
111f09: 8b 50 58 mov 0x58(%eax),%edx
111f0c: 85 d2 test %edx,%edx
111f0e: 74 10 je 111f20 <IMFS_memfile_remove+0x2c>
memfile_free_blocks_in_table( &info->indirect, to_free );
111f10: 83 ec 08 sub $0x8,%esp
111f13: 57 push %edi
111f14: 83 c0 58 add $0x58,%eax
111f17: 50 push %eax
111f18: e8 7b ff ff ff call 111e98 <memfile_free_blocks_in_table>
111f1d: 83 c4 10 add $0x10,%esp
}
if ( info->doubly_indirect ) {
111f20: 8b 4d 08 mov 0x8(%ebp),%ecx
111f23: 8b 51 5c mov 0x5c(%ecx),%edx
111f26: 85 d2 test %edx,%edx
111f28: 74 55 je 111f7f <IMFS_memfile_remove+0x8b>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111f2a: a1 a0 79 12 00 mov 0x1279a0,%eax
111f2f: 89 c1 mov %eax,%ecx
111f31: c1 e9 02 shr $0x2,%ecx
111f34: 74 36 je 111f6c <IMFS_memfile_remove+0x78><== NEVER TAKEN
111f36: 31 c9 xor %ecx,%ecx
111f38: 31 db xor %ebx,%ebx
111f3a: 8b 75 08 mov 0x8(%ebp),%esi
111f3d: eb 04 jmp 111f43 <IMFS_memfile_remove+0x4f>
111f3f: 90 nop
111f40: 8b 56 5c mov 0x5c(%esi),%edx
if ( info->doubly_indirect[i] ) {
111f43: c1 e1 02 shl $0x2,%ecx
111f46: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1)
111f4a: 74 14 je 111f60 <IMFS_memfile_remove+0x6c><== NEVER TAKEN
memfile_free_blocks_in_table(
111f4c: 83 ec 08 sub $0x8,%esp
111f4f: 57 push %edi
111f50: 01 ca add %ecx,%edx
111f52: 52 push %edx
111f53: e8 40 ff ff ff call 111e98 <memfile_free_blocks_in_table>
111f58: 83 c4 10 add $0x10,%esp
111f5b: a1 a0 79 12 00 mov 0x1279a0,%eax
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111f60: 43 inc %ebx
111f61: 89 d9 mov %ebx,%ecx
111f63: 89 c2 mov %eax,%edx
111f65: c1 ea 02 shr $0x2,%edx
111f68: 39 da cmp %ebx,%edx
111f6a: 77 d4 ja 111f40 <IMFS_memfile_remove+0x4c>
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 );
111f6c: 83 ec 08 sub $0x8,%esp
111f6f: 57 push %edi
111f70: 8b 45 08 mov 0x8(%ebp),%eax
111f73: 83 c0 5c add $0x5c,%eax
111f76: 50 push %eax
111f77: e8 1c ff ff ff call 111e98 <memfile_free_blocks_in_table>
111f7c: 83 c4 10 add $0x10,%esp
}
if ( info->triply_indirect ) {
111f7f: 8b 45 08 mov 0x8(%ebp),%eax
111f82: 8b 50 60 mov 0x60(%eax),%edx
111f85: 85 d2 test %edx,%edx
111f87: 0f 84 b6 00 00 00 je 112043 <IMFS_memfile_remove+0x14f>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
111f8d: a1 a0 79 12 00 mov 0x1279a0,%eax
111f92: 89 c1 mov %eax,%ecx
111f94: c1 e9 02 shr $0x2,%ecx
111f97: 0f 84 93 00 00 00 je 112030 <IMFS_memfile_remove+0x13c><== NEVER TAKEN
p = (block_p *) info->triply_indirect[i];
111f9d: 8b 32 mov (%edx),%esi
if ( !p ) /* ensure we have a valid pointer */
111f9f: 85 f6 test %esi,%esi
111fa1: 0f 84 89 00 00 00 je 112030 <IMFS_memfile_remove+0x13c><== NEVER TAKEN
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
111fa7: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
if ( !p ) /* ensure we have a valid pointer */
111fae: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
111fb5: 8d 76 00 lea 0x0(%esi),%esi
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
111fb8: 89 c2 mov %eax,%edx
111fba: c1 ea 02 shr $0x2,%edx
111fbd: 74 30 je 111fef <IMFS_memfile_remove+0xfb><== NEVER TAKEN
111fbf: 31 d2 xor %edx,%edx
111fc1: 31 db xor %ebx,%ebx
111fc3: 90 nop
if ( p[j] ) {
111fc4: c1 e2 02 shl $0x2,%edx
111fc7: 8b 0c 16 mov (%esi,%edx,1),%ecx
111fca: 85 c9 test %ecx,%ecx
111fcc: 74 15 je 111fe3 <IMFS_memfile_remove+0xef><== NEVER TAKEN
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
111fce: 83 ec 08 sub $0x8,%esp
111fd1: 57 push %edi
111fd2: 8d 14 16 lea (%esi,%edx,1),%edx
111fd5: 52 push %edx
111fd6: e8 bd fe ff ff call 111e98 <memfile_free_blocks_in_table>
111fdb: 83 c4 10 add $0x10,%esp
111fde: a1 a0 79 12 00 mov 0x1279a0,%eax
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++ ) {
111fe3: 43 inc %ebx
111fe4: 89 da mov %ebx,%edx
111fe6: 89 c1 mov %eax,%ecx
111fe8: c1 e9 02 shr $0x2,%ecx
111feb: 39 cb cmp %ecx,%ebx
111fed: 72 d5 jb 111fc4 <IMFS_memfile_remove+0xd0>
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
111fef: 83 ec 08 sub $0x8,%esp
111ff2: 57 push %edi
111ff3: 8b 45 e0 mov -0x20(%ebp),%eax
111ff6: 8b 4d 08 mov 0x8(%ebp),%ecx
111ff9: 03 41 60 add 0x60(%ecx),%eax
111ffc: 50 push %eax
111ffd: e8 96 fe ff ff call 111e98 <memfile_free_blocks_in_table>
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
112002: ff 45 e4 incl -0x1c(%ebp)
112005: a1 a0 79 12 00 mov 0x1279a0,%eax
11200a: 89 c2 mov %eax,%edx
11200c: c1 ea 02 shr $0x2,%edx
11200f: 83 c4 10 add $0x10,%esp
112012: 3b 55 e4 cmp -0x1c(%ebp),%edx
112015: 76 19 jbe 112030 <IMFS_memfile_remove+0x13c>
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
112017: 8b 55 e4 mov -0x1c(%ebp),%edx
11201a: c1 e2 02 shl $0x2,%edx
11201d: 89 55 e0 mov %edx,-0x20(%ebp)
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
112020: 8b 4d 08 mov 0x8(%ebp),%ecx
112023: 8b 51 60 mov 0x60(%ecx),%edx
112026: 8b 4d e0 mov -0x20(%ebp),%ecx
112029: 8b 34 0a mov (%edx,%ecx,1),%esi
if ( !p ) /* ensure we have a valid pointer */
11202c: 85 f6 test %esi,%esi
11202e: 75 88 jne 111fb8 <IMFS_memfile_remove+0xc4><== ALWAYS TAKEN
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
112030: 83 ec 08 sub $0x8,%esp
112033: 57 push %edi
(block_p **)&info->triply_indirect, to_free );
112034: 8b 45 08 mov 0x8(%ebp),%eax
112037: 83 c0 60 add $0x60,%eax
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
11203a: 50 push %eax
11203b: e8 58 fe ff ff call 111e98 <memfile_free_blocks_in_table>
112040: 83 c4 10 add $0x10,%esp
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
112043: 31 c0 xor %eax,%eax
112045: 8d 65 f4 lea -0xc(%ebp),%esp
112048: 5b pop %ebx
112049: 5e pop %esi
11204a: 5f pop %edi
11204b: c9 leave
11204c: c3 ret
00112194 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
112194: 55 push %ebp
112195: 89 e5 mov %esp,%ebp
112197: 57 push %edi
112198: 56 push %esi
112199: 53 push %ebx
11219a: 83 ec 3c sub $0x3c,%esp
11219d: 8b 5d 0c mov 0xc(%ebp),%ebx
1121a0: 8b 75 10 mov 0x10(%ebp),%esi
/*
* 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 + my_length;
1121a3: 8b 4d 18 mov 0x18(%ebp),%ecx
1121a6: 01 d9 add %ebx,%ecx
if ( last_byte > the_jnode->info.file.size ) {
1121a8: 89 c8 mov %ecx,%eax
1121aa: 31 d2 xor %edx,%edx
1121ac: 8b 7d 08 mov 0x8(%ebp),%edi
1121af: 3b 57 54 cmp 0x54(%edi),%edx
1121b2: 7c 1c jl 1121d0 <IMFS_memfile_write+0x3c><== NEVER TAKEN
1121b4: 0f 8e f2 00 00 00 jle 1122ac <IMFS_memfile_write+0x118><== ALWAYS TAKEN
status = IMFS_memfile_extend( the_jnode, last_byte );
1121ba: 51 push %ecx
1121bb: 52 push %edx
1121bc: 50 push %eax
1121bd: ff 75 08 pushl 0x8(%ebp)
1121c0: e8 b7 fe ff ff call 11207c <IMFS_memfile_extend>
if ( status )
1121c5: 83 c4 10 add $0x10,%esp
1121c8: 85 c0 test %eax,%eax
1121ca: 0f 85 52 01 00 00 jne 112322 <IMFS_memfile_write+0x18e>
*/
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
1121d0: a1 a0 79 12 00 mov 0x1279a0,%eax
1121d5: 89 45 d4 mov %eax,-0x2c(%ebp)
1121d8: 99 cltd
1121d9: 89 45 c8 mov %eax,-0x38(%ebp)
1121dc: 89 55 cc mov %edx,-0x34(%ebp)
1121df: 52 push %edx
1121e0: 50 push %eax
1121e1: 56 push %esi
1121e2: 53 push %ebx
1121e3: e8 54 ca 00 00 call 11ec3c <__moddi3>
1121e8: 83 c4 10 add $0x10,%esp
1121eb: 89 c7 mov %eax,%edi
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
1121ed: ff 75 cc pushl -0x34(%ebp)
1121f0: ff 75 c8 pushl -0x38(%ebp)
1121f3: 56 push %esi
1121f4: 53 push %ebx
1121f5: e8 f6 c8 00 00 call 11eaf0 <__divdi3>
1121fa: 83 c4 10 add $0x10,%esp
1121fd: 89 c3 mov %eax,%ebx
if ( start_offset ) {
1121ff: 85 ff test %edi,%edi
112201: 75 5d jne 112260 <IMFS_memfile_write+0xcc>
unsigned int last_byte;
unsigned int start_offset;
int copied;
const unsigned char *src;
src = source;
112203: 8b 75 14 mov 0x14(%ebp),%esi
/*
* 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 ) {
112206: 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;
112209: 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 ) {
112210: 3b 55 d4 cmp -0x2c(%ebp),%edx
112213: 73 26 jae 11223b <IMFS_memfile_write+0xa7>
112215: e9 a2 00 00 00 jmp 1122bc <IMFS_memfile_write+0x128>
11221a: 66 90 xchg %ax,%ax
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 );
11221c: 8b 00 mov (%eax),%eax
src += to_copy;
11221e: 89 c7 mov %eax,%edi
112220: 8b 4d d4 mov -0x2c(%ebp),%ecx
112223: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
112225: 43 inc %ebx
my_length -= to_copy;
112226: 2b 55 d4 sub -0x2c(%ebp),%edx
* IMFS_memfile_write
*
* 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(
112229: 8b 45 d4 mov -0x2c(%ebp),%eax
11222c: 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 ) {
11222f: 39 15 a0 79 12 00 cmp %edx,0x1279a0
112235: 0f 87 81 00 00 00 ja 1122bc <IMFS_memfile_write+0x128>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
11223b: 57 push %edi
11223c: 6a 00 push $0x0
11223e: 53 push %ebx
11223f: ff 75 08 pushl 0x8(%ebp)
112242: 89 55 c4 mov %edx,-0x3c(%ebp)
112245: e8 2e f8 ff ff call 111a78 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
11224a: 83 c4 10 add $0x10,%esp
11224d: 85 c0 test %eax,%eax
11224f: 8b 55 c4 mov -0x3c(%ebp),%edx
112252: 75 c8 jne 11221c <IMFS_memfile_write+0x88><== ALWAYS TAKEN
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
112254: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
112257: 8d 65 f4 lea -0xc(%ebp),%esp
11225a: 5b pop %ebx
11225b: 5e pop %esi
11225c: 5f pop %edi
11225d: c9 leave
11225e: c3 ret
11225f: 90 nop
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
112260: 50 push %eax
112261: 6a 00 push $0x0
112263: 53 push %ebx
112264: ff 75 08 pushl 0x8(%ebp)
112267: e8 0c f8 ff ff call 111a78 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
11226c: 83 c4 10 add $0x10,%esp
11226f: 85 c0 test %eax,%eax
112271: 0f 84 a1 00 00 00 je 112318 <IMFS_memfile_write+0x184><== NEVER TAKEN
* 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 ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
112277: 8b 55 d4 mov -0x2c(%ebp),%edx
11227a: 29 fa sub %edi,%edx
11227c: 89 55 c8 mov %edx,-0x38(%ebp)
11227f: 8b 55 18 mov 0x18(%ebp),%edx
112282: 39 55 c8 cmp %edx,-0x38(%ebp)
112285: 0f 87 85 00 00 00 ja 112310 <IMFS_memfile_write+0x17c>
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
11228b: 03 38 add (%eax),%edi
src += to_copy;
11228d: 8b 75 14 mov 0x14(%ebp),%esi
112290: 8b 4d c8 mov -0x38(%ebp),%ecx
112293: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
block++;
112295: 43 inc %ebx
my_length -= to_copy;
112296: 8b 55 18 mov 0x18(%ebp),%edx
112299: 2b 55 c8 sub -0x38(%ebp),%edx
copied += to_copy;
11229c: 8b 3d a0 79 12 00 mov 0x1279a0,%edi
1122a2: 89 7d d4 mov %edi,-0x2c(%ebp)
1122a5: e9 66 ff ff ff jmp 112210 <IMFS_memfile_write+0x7c>
1122aa: 66 90 xchg %ax,%ax
* 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 + my_length;
if ( last_byte > the_jnode->info.file.size ) {
1122ac: 3b 4f 50 cmp 0x50(%edi),%ecx
1122af: 0f 86 1b ff ff ff jbe 1121d0 <IMFS_memfile_write+0x3c><== NEVER TAKEN
1122b5: e9 00 ff ff ff jmp 1121ba <IMFS_memfile_write+0x26>
1122ba: 66 90 xchg %ax,%ax
* Phase 3: possibly the first part of one block
*/
IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
1122bc: 85 d2 test %edx,%edx
1122be: 74 28 je 1122e8 <IMFS_memfile_write+0x154>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
1122c0: 51 push %ecx
1122c1: 6a 00 push $0x0
1122c3: 53 push %ebx
1122c4: ff 75 08 pushl 0x8(%ebp)
1122c7: 89 55 c4 mov %edx,-0x3c(%ebp)
1122ca: e8 a9 f7 ff ff call 111a78 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
1122cf: 83 c4 10 add $0x10,%esp
1122d2: 85 c0 test %eax,%eax
1122d4: 8b 55 c4 mov -0x3c(%ebp),%edx
1122d7: 0f 84 77 ff ff ff je 112254 <IMFS_memfile_write+0xc0><== 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 );
1122dd: 8b 00 mov (%eax),%eax
1122df: 89 c7 mov %eax,%edi
1122e1: 89 d1 mov %edx,%ecx
1122e3: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
my_length = 0;
copied += to_copy;
1122e5: 01 55 c8 add %edx,-0x38(%ebp)
}
IMFS_mtime_ctime_update( the_jnode );
1122e8: 83 ec 08 sub $0x8,%esp
1122eb: 6a 00 push $0x0
1122ed: 8d 45 e0 lea -0x20(%ebp),%eax
1122f0: 50 push %eax
1122f1: e8 5a 5e ff ff call 108150 <gettimeofday>
1122f6: 8b 45 e0 mov -0x20(%ebp),%eax
1122f9: 8b 55 08 mov 0x8(%ebp),%edx
1122fc: 89 42 44 mov %eax,0x44(%edx)
1122ff: 89 42 48 mov %eax,0x48(%edx)
return copied;
112302: 83 c4 10 add $0x10,%esp
112305: 8b 45 c8 mov -0x38(%ebp),%eax
}
112308: 8d 65 f4 lea -0xc(%ebp),%esp
11230b: 5b pop %ebx
11230c: 5e pop %esi
11230d: 5f pop %edi
11230e: c9 leave
11230f: c3 ret
* 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 ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
112310: 89 55 c8 mov %edx,-0x38(%ebp)
112313: e9 73 ff ff ff jmp 11228b <IMFS_memfile_write+0xf7>
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;
112318: 31 c0 xor %eax,%eax
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
11231a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11231d: 5b pop %ebx <== NOT EXECUTED
11231e: 5e pop %esi <== NOT EXECUTED
11231f: 5f pop %edi <== NOT EXECUTED
112320: c9 leave <== NOT EXECUTED
112321: c3 ret <== NOT EXECUTED
last_byte = start + my_length;
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
112322: e8 bd 0f 00 00 call 1132e4 <__errno>
112327: c7 00 1c 00 00 00 movl $0x1c,(%eax)
11232d: 83 c8 ff or $0xffffffff,%eax
112330: e9 22 ff ff ff jmp 112257 <IMFS_memfile_write+0xc3>
001079dc <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
1079dc: 55 push %ebp
1079dd: 89 e5 mov %esp,%ebp
1079df: 57 push %edi
1079e0: 56 push %esi
1079e1: 53 push %ebx
1079e2: 83 ec 5c sub $0x5c,%esp
1079e5: 8b 55 08 mov 0x8(%ebp),%edx
1079e8: 8b 5d 0c mov 0xc(%ebp),%ebx
1079eb: 8b 75 10 mov 0x10(%ebp),%esi
1079ee: 8b 45 14 mov 0x14(%ebp),%eax
1079f1: 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 );
1079f4: 31 c0 xor %eax,%eax
1079f6: b9 ff ff ff ff mov $0xffffffff,%ecx
1079fb: 89 d7 mov %edx,%edi
1079fd: f2 ae repnz scas %es:(%edi),%al
1079ff: f7 d1 not %ecx
107a01: 49 dec %ecx
107a02: 8d 45 e4 lea -0x1c(%ebp),%eax
107a05: 50 push %eax
107a06: 8d 7d af lea -0x51(%ebp),%edi
107a09: 57 push %edi
107a0a: 51 push %ecx
107a0b: 52 push %edx
107a0c: e8 93 7f 00 00 call 10f9a4 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
107a11: 89 d8 mov %ebx,%eax
107a13: 25 00 f0 00 00 and $0xf000,%eax
107a18: 83 c4 10 add $0x10,%esp
107a1b: 3d 00 40 00 00 cmp $0x4000,%eax
107a20: 74 56 je 107a78 <IMFS_mknod+0x9c>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
107a22: 3d 00 80 00 00 cmp $0x8000,%eax
107a27: 74 57 je 107a80 <IMFS_mknod+0xa4>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
107a29: 3d 00 60 00 00 cmp $0x6000,%eax
107a2e: 74 14 je 107a44 <IMFS_mknod+0x68>
107a30: 3d 00 20 00 00 cmp $0x2000,%eax
107a35: 74 0d je 107a44 <IMFS_mknod+0x68>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
} else if (S_ISFIFO(mode))
107a37: 3d 00 10 00 00 cmp $0x1000,%eax
107a3c: 74 4a je 107a88 <IMFS_mknod+0xac> <== ALWAYS TAKEN
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
IMFS_token_types type = 0;
107a3e: 31 d2 xor %edx,%edx <== NOT EXECUTED
107a40: eb 10 jmp 107a52 <IMFS_mknod+0x76> <== NOT EXECUTED
107a42: 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 );
107a44: 89 75 d0 mov %esi,-0x30(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
107a47: 8b 45 a4 mov -0x5c(%ebp),%eax
107a4a: 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;
107a4d: ba 02 00 00 00 mov $0x2,%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( pathloc, type, new_name, mode, &info );
107a52: 83 ec 0c sub $0xc,%esp
107a55: 8d 45 d0 lea -0x30(%ebp),%eax
107a58: 50 push %eax
107a59: 53 push %ebx
107a5a: 57 push %edi
107a5b: 52 push %edx
107a5c: ff 75 18 pushl 0x18(%ebp)
107a5f: e8 78 75 00 00 call 10efdc <IMFS_create_node>
if ( !new_node )
107a64: 83 c4 20 add $0x20,%esp
107a67: 85 c0 test %eax,%eax
107a69: 74 24 je 107a8f <IMFS_mknod+0xb3>
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
107a6b: 31 c0 xor %eax,%eax
}
107a6d: 8d 65 f4 lea -0xc(%ebp),%esp
107a70: 5b pop %ebx
107a71: 5e pop %esi
107a72: 5f pop %edi
107a73: c9 leave
107a74: c3 ret
107a75: 8d 76 00 lea 0x0(%esi),%esi
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
107a78: ba 01 00 00 00 mov $0x1,%edx
107a7d: eb d3 jmp 107a52 <IMFS_mknod+0x76>
107a7f: 90 nop
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
107a80: ba 05 00 00 00 mov $0x5,%edx
107a85: eb cb jmp 107a52 <IMFS_mknod+0x76>
107a87: 90 nop
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
} else if (S_ISFIFO(mode))
type = IMFS_FIFO;
107a88: ba 07 00 00 00 mov $0x7,%edx
107a8d: eb c3 jmp 107a52 <IMFS_mknod+0x76>
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node( pathloc, type, new_name, mode, &info );
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
107a8f: e8 50 b8 00 00 call 1132e4 <__errno>
107a94: c7 00 0c 00 00 00 movl $0xc,(%eax)
107a9a: b8 ff ff ff ff mov $0xffffffff,%eax
107a9f: eb cc jmp 107a6d <IMFS_mknod+0x91>
00107aa4 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
107aa4: 55 push %ebp
107aa5: 89 e5 mov %esp,%ebp
107aa7: 83 ec 08 sub $0x8,%esp
107aaa: 8b 55 08 mov 0x8(%ebp),%edx
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
107aad: 8b 42 08 mov 0x8(%edx),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
107ab0: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
107ab4: 75 0a jne 107ac0 <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;
107ab6: 89 50 5c mov %edx,0x5c(%eax)
return 0;
107ab9: 31 c0 xor %eax,%eax
}
107abb: c9 leave
107abc: c3 ret
107abd: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
107ac0: e8 1f b8 00 00 call 1132e4 <__errno> <== NOT EXECUTED
107ac5: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
107acb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
107ad0: c9 leave <== NOT EXECUTED
107ad1: c3 ret <== NOT EXECUTED
0010a3d0 <IMFS_print_jnode>:
* This routine prints the contents of the specified jnode.
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
10a3d0: 55 push %ebp
10a3d1: 89 e5 mov %esp,%ebp
10a3d3: 53 push %ebx
10a3d4: 83 ec 0c sub $0xc,%esp
10a3d7: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
10a3da: a1 c0 c4 12 00 mov 0x12c4c0,%eax
10a3df: ff 70 08 pushl 0x8(%eax)
10a3e2: 8d 43 0c lea 0xc(%ebx),%eax
10a3e5: 50 push %eax
10a3e6: e8 15 d6 00 00 call 117a00 <fputs>
switch( the_jnode->type ) {
10a3eb: 8b 43 4c mov 0x4c(%ebx),%eax
10a3ee: 83 c4 10 add $0x10,%esp
10a3f1: 83 f8 07 cmp $0x7,%eax
10a3f4: 76 1e jbe 10a414 <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 );
10a3f6: 52 push %edx <== NOT EXECUTED
10a3f7: 50 push %eax <== NOT EXECUTED
10a3f8: 68 24 72 12 00 push $0x127224 <== NOT EXECUTED
10a3fd: a1 c0 c4 12 00 mov 0x12c4c0,%eax <== NOT EXECUTED
10a402: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED
10a405: e8 ea d4 00 00 call 1178f4 <fprintf> <== NOT EXECUTED
return;
10a40a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
puts("");
}
10a40d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10a410: c9 leave <== NOT EXECUTED
10a411: c3 ret <== NOT EXECUTED
10a412: 66 90 xchg %ax,%ax <== NOT EXECUTED
)
{
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
10a414: ff 24 85 3c 72 12 00 jmp *0x12723c(,%eax,4)
10a41b: 90 nop
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
10a41c: a1 c0 c4 12 00 mov 0x12c4c0,%eax
10a421: ff 70 08 pushl 0x8(%eax)
10a424: 6a 13 push $0x13
10a426: 6a 01 push $0x1
10a428: 68 fd 71 12 00 push $0x1271fd
10a42d: e8 f2 e1 00 00 call 118624 <fwrite>
return;
10a432: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
10a435: 8b 5d fc mov -0x4(%ebp),%ebx
10a438: c9 leave
10a439: c3 ret
10a43a: 66 90 xchg %ax,%ax
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
10a43c: a1 c0 c4 12 00 mov 0x12c4c0,%eax
10a441: ff 70 08 pushl 0x8(%eax)
10a444: 6a 12 push $0x12
10a446: 6a 01 push $0x1
10a448: 68 11 72 12 00 push $0x127211
10a44d: e8 d2 e1 00 00 call 118624 <fwrite>
return;
10a452: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
10a455: 8b 5d fc mov -0x4(%ebp),%ebx
10a458: c9 leave
10a459: c3 ret
10a45a: 66 90 xchg %ax,%ax
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
10a45c: 51 push %ecx
10a45d: ff 73 50 pushl 0x50(%ebx)
10a460: 68 f1 71 12 00 push $0x1271f1
10a465: a1 c0 c4 12 00 mov 0x12c4c0,%eax
10a46a: ff 70 08 pushl 0x8(%eax)
10a46d: e8 82 d4 00 00 call 1178f4 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
10a472: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a475: c7 45 08 29 75 12 00 movl $0x127529,0x8(%ebp)
}
10a47c: 8b 5d fc mov -0x4(%ebp),%ebx
10a47f: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a480: e9 93 ed 00 00 jmp 119218 <puts>
10a485: 8d 76 00 lea 0x0(%esi),%esi
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)",
10a488: ff 73 58 pushl 0x58(%ebx)
10a48b: ff 73 50 pushl 0x50(%ebx)
10a48e: 68 e2 71 12 00 push $0x1271e2
10a493: a1 c0 c4 12 00 mov 0x12c4c0,%eax
10a498: ff 70 08 pushl 0x8(%eax)
10a49b: e8 54 d4 00 00 call 1178f4 <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
10a4a0: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a4a3: c7 45 08 29 75 12 00 movl $0x127529,0x8(%ebp)
}
10a4aa: 8b 5d fc mov -0x4(%ebp),%ebx
10a4ad: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a4ae: e9 65 ed 00 00 jmp 119218 <puts>
10a4b3: 90 nop
IMFS_assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
10a4b4: 83 ec 08 sub $0x8,%esp
10a4b7: a1 c0 c4 12 00 mov 0x12c4c0,%eax
10a4bc: ff 70 08 pushl 0x8(%eax)
10a4bf: 6a 2f push $0x2f
10a4c1: e8 8e d4 00 00 call 117954 <fputc>
break;
10a4c6: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a4c9: c7 45 08 29 75 12 00 movl $0x127529,0x8(%ebp)
}
10a4d0: 8b 5d fc mov -0x4(%ebp),%ebx
10a4d3: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a4d4: e9 3f ed 00 00 jmp 119218 <puts>
10a4d9: 8d 76 00 lea 0x0(%esi),%esi
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
10a4dc: ff 73 54 pushl 0x54(%ebx)
10a4df: ff 73 50 pushl 0x50(%ebx)
10a4e2: 68 cf 71 12 00 push $0x1271cf
10a4e7: a1 c0 c4 12 00 mov 0x12c4c0,%eax
10a4ec: ff 70 08 pushl 0x8(%eax)
10a4ef: e8 00 d4 00 00 call 1178f4 <fprintf>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
10a4f4: 83 c4 10 add $0x10,%esp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a4f7: c7 45 08 29 75 12 00 movl $0x127529,0x8(%ebp)
}
10a4fe: 8b 5d fc mov -0x4(%ebp),%ebx
10a501: c9 leave
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
10a502: e9 11 ed 00 00 jmp 119218 <puts>
00107ae4 <IMFS_readlink>:
ssize_t IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
107ae4: 55 push %ebp
107ae5: 89 e5 mov %esp,%ebp
107ae7: 57 push %edi
107ae8: 56 push %esi
107ae9: 53 push %ebx
107aea: 8b 7d 0c mov 0xc(%ebp),%edi
107aed: 8b 5d 10 mov 0x10(%ebp),%ebx
IMFS_jnode_t *node;
ssize_t i;
node = loc->node_access;
107af0: 8b 45 08 mov 0x8(%ebp),%eax
107af3: 8b 30 mov (%eax),%esi
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
107af5: 85 db test %ebx,%ebx
107af7: 74 28 je 107b21 <IMFS_readlink+0x3d> <== NEVER TAKEN
107af9: 8b 46 50 mov 0x50(%esi),%eax
107afc: 8a 10 mov (%eax),%dl
107afe: 84 d2 test %dl,%dl
107b00: 74 1f je 107b21 <IMFS_readlink+0x3d> <== NEVER TAKEN
107b02: 31 c9 xor %ecx,%ecx
107b04: 31 c0 xor %eax,%eax
107b06: eb 0a jmp 107b12 <IMFS_readlink+0x2e>
107b08: 8b 56 50 mov 0x50(%esi),%edx
107b0b: 8a 14 02 mov (%edx,%eax,1),%dl
107b0e: 84 d2 test %dl,%dl
107b10: 74 0a je 107b1c <IMFS_readlink+0x38>
buf[i] = node->info.sym_link.name[i];
107b12: 88 14 0f mov %dl,(%edi,%ecx,1)
node = loc->node_access;
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
107b15: 40 inc %eax
107b16: 89 c1 mov %eax,%ecx
107b18: 39 d8 cmp %ebx,%eax
107b1a: 72 ec jb 107b08 <IMFS_readlink+0x24>
buf[i] = node->info.sym_link.name[i];
return i;
}
107b1c: 5b pop %ebx
107b1d: 5e pop %esi
107b1e: 5f pop %edi
107b1f: c9 leave
107b20: c3 ret
node = loc->node_access;
IMFS_assert( node->type == IMFS_SYM_LINK );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
107b21: 31 c0 xor %eax,%eax
107b23: eb f7 jmp 107b1c <IMFS_readlink+0x38> <== NOT EXECUTED
00107b28 <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 */
)
{
107b28: 55 push %ebp
107b29: 89 e5 mov %esp,%ebp
107b2b: 53 push %ebx
107b2c: 83 ec 18 sub $0x18,%esp
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
107b2f: 8b 45 0c mov 0xc(%ebp),%eax
107b32: 8b 18 mov (%eax),%ebx
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
107b34: 6a 20 push $0x20
107b36: ff 75 14 pushl 0x14(%ebp)
107b39: 8d 43 0c lea 0xc(%ebx),%eax
107b3c: 50 push %eax
107b3d: e8 9a c5 00 00 call 1140dc <strncpy>
if ( the_jnode->Parent != NULL )
107b42: 83 c4 10 add $0x10,%esp
107b45: 8b 4b 08 mov 0x8(%ebx),%ecx
107b48: 85 c9 test %ecx,%ecx
107b4a: 74 0c je 107b58 <IMFS_rename+0x30> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
107b4c: 83 ec 0c sub $0xc,%esp
107b4f: 53 push %ebx
107b50: e8 ef 44 00 00 call 10c044 <_Chain_Extract>
107b55: 83 c4 10 add $0x10,%esp
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
107b58: 8b 45 10 mov 0x10(%ebp),%eax
107b5b: 8b 00 mov (%eax),%eax
the_jnode->Parent = new_parent;
107b5d: 89 43 08 mov %eax,0x8(%ebx)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
107b60: 83 ec 08 sub $0x8,%esp
107b63: 53 push %ebx
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
107b64: 83 c0 50 add $0x50,%eax
107b67: 50 push %eax
107b68: e8 b3 44 00 00 call 10c020 <_Chain_Append>
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
107b6d: 58 pop %eax
107b6e: 5a pop %edx
107b6f: 6a 00 push $0x0
107b71: 8d 45 f0 lea -0x10(%ebp),%eax
107b74: 50 push %eax
107b75: e8 d6 05 00 00 call 108150 <gettimeofday>
107b7a: 8b 45 f0 mov -0x10(%ebp),%eax
107b7d: 89 43 48 mov %eax,0x48(%ebx)
return 0;
}
107b80: 31 c0 xor %eax,%eax
107b82: 8b 5d fc mov -0x4(%ebp),%ebx
107b85: c9 leave
107b86: c3 ret
0010fb70 <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
10fb70: 55 push %ebp
10fb71: 89 e5 mov %esp,%ebp
10fb73: 56 push %esi
10fb74: 53 push %ebx
10fb75: 8b 4d 08 mov 0x8(%ebp),%ecx
10fb78: 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;
10fb7b: 8b 11 mov (%ecx),%edx
switch ( the_jnode->type ) {
10fb7d: 83 7a 4c 07 cmpl $0x7,0x4c(%edx)
10fb81: 76 15 jbe 10fb98 <IMFS_stat+0x28> <== ALWAYS TAKEN
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
10fb83: e8 5c 37 00 00 call 1132e4 <__errno>
10fb88: c7 00 86 00 00 00 movl $0x86,(%eax)
10fb8e: b8 ff ff ff ff mov $0xffffffff,%eax
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
10fb93: 5b pop %ebx
10fb94: 5e pop %esi
10fb95: c9 leave
10fb96: c3 ret
10fb97: 90 nop
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
10fb98: 8b 5a 4c mov 0x4c(%edx),%ebx
10fb9b: ff 24 9d b8 19 12 00 jmp *0x1219b8(,%ebx,4)
10fba2: 66 90 xchg %ax,%ax
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
10fba4: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
10fbab: 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;
10fbb2: 8b 49 10 mov 0x10(%ecx),%ecx
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
10fbb5: 8b 49 34 mov 0x34(%ecx),%ecx
10fbb8: 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 =
10fbba: c7 00 fe ff 00 00 movl $0xfffe,(%eax)
10fbc0: 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;
10fbc3: 8b 4a 30 mov 0x30(%edx),%ecx
10fbc6: 89 48 0c mov %ecx,0xc(%eax)
buf->st_nlink = the_jnode->st_nlink;
10fbc9: 8b 4a 34 mov 0x34(%edx),%ecx
10fbcc: 66 89 48 10 mov %cx,0x10(%eax)
buf->st_ino = the_jnode->st_ino;
10fbd0: 8b 4a 38 mov 0x38(%edx),%ecx
10fbd3: 89 48 08 mov %ecx,0x8(%eax)
buf->st_uid = the_jnode->st_uid;
10fbd6: 8b 4a 3c mov 0x3c(%edx),%ecx
10fbd9: 66 89 48 12 mov %cx,0x12(%eax)
buf->st_gid = the_jnode->st_gid;
10fbdd: 66 8b 4a 3e mov 0x3e(%edx),%cx
10fbe1: 66 89 48 14 mov %cx,0x14(%eax)
buf->st_atime = the_jnode->stat_atime;
10fbe5: 8b 4a 40 mov 0x40(%edx),%ecx
10fbe8: 89 48 28 mov %ecx,0x28(%eax)
buf->st_mtime = the_jnode->stat_mtime;
10fbeb: 8b 4a 44 mov 0x44(%edx),%ecx
10fbee: 89 48 30 mov %ecx,0x30(%eax)
buf->st_ctime = the_jnode->stat_ctime;
10fbf1: 8b 52 48 mov 0x48(%edx),%edx
10fbf4: 89 50 38 mov %edx,0x38(%eax)
return 0;
10fbf7: 31 c0 xor %eax,%eax
}
10fbf9: 5b pop %ebx
10fbfa: 5e pop %esi
10fbfb: c9 leave
10fbfc: c3 ret
10fbfd: 8d 76 00 lea 0x0(%esi),%esi
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
10fc00: 8b 5a 54 mov 0x54(%edx),%ebx
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
10fc03: 8b 72 50 mov 0x50(%edx),%esi
10fc06: 89 70 18 mov %esi,0x18(%eax)
10fc09: 89 58 1c mov %ebx,0x1c(%eax)
break;
10fc0c: eb a4 jmp 10fbb2 <IMFS_stat+0x42>
10fc0e: 66 90 xchg %ax,%ax
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
10fc10: 8b 5a 50 mov 0x50(%edx),%ebx
10fc13: 8b 72 54 mov 0x54(%edx),%esi
10fc16: 89 58 20 mov %ebx,0x20(%eax)
10fc19: 89 70 24 mov %esi,0x24(%eax)
break;
10fc1c: eb 94 jmp 10fbb2 <IMFS_stat+0x42>
00107c1c <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
107c1c: 55 push %ebp
107c1d: 89 e5 mov %esp,%ebp
107c1f: 57 push %edi
107c20: 56 push %esi
107c21: 53 push %ebx
107c22: 83 ec 3c sub $0x3c,%esp
107c25: 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;
107c28: 8b 13 mov (%ebx),%edx
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
107c2a: 83 7a 4c 03 cmpl $0x3,0x4c(%edx)
107c2e: 74 18 je 107c48 <IMFS_unlink+0x2c>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
107c30: 83 ec 08 sub $0x8,%esp
107c33: 8b 43 08 mov 0x8(%ebx),%eax
107c36: 53 push %ebx
107c37: ff 75 08 pushl 0x8(%ebp)
107c3a: ff 50 34 call *0x34(%eax)
return result;
107c3d: 83 c4 10 add $0x10,%esp
}
107c40: 8d 65 f4 lea -0xc(%ebp),%esp
107c43: 5b pop %ebx
107c44: 5e pop %esi
107c45: 5f pop %edi
107c46: c9 leave
107c47: c3 ret
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
107c48: 8b 42 50 mov 0x50(%edx),%eax
107c4b: 85 c0 test %eax,%eax
107c4d: 74 79 je 107cc8 <IMFS_unlink+0xac> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
107c4f: 8d 7d cc lea -0x34(%ebp),%edi
107c52: b9 05 00 00 00 mov $0x5,%ecx
107c57: 89 de mov %ebx,%esi
107c59: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_link.node_access = node->info.hard_link.link_node;
107c5b: 89 45 cc mov %eax,-0x34(%ebp)
IMFS_Set_handlers( &the_link );
107c5e: 83 ec 0c sub $0xc,%esp
107c61: 8d 75 cc lea -0x34(%ebp),%esi
107c64: 56 push %esi
107c65: 89 55 c4 mov %edx,-0x3c(%ebp)
107c68: e8 db 74 00 00 call 10f148 <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)
107c6d: 8b 55 c4 mov -0x3c(%ebp),%edx
107c70: 8b 42 50 mov 0x50(%edx),%eax
107c73: 8b 48 34 mov 0x34(%eax),%ecx
107c76: 83 c4 10 add $0x10,%esp
107c79: 66 83 f9 01 cmp $0x1,%cx
107c7d: 74 27 je 107ca6 <IMFS_unlink+0x8a>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
107c7f: 49 dec %ecx
107c80: 66 89 48 34 mov %cx,0x34(%eax)
IMFS_update_ctime( node->info.hard_link.link_node );
107c84: 83 ec 08 sub $0x8,%esp
107c87: 6a 00 push $0x0
107c89: 8d 45 e0 lea -0x20(%ebp),%eax
107c8c: 50 push %eax
107c8d: 89 55 c4 mov %edx,-0x3c(%ebp)
107c90: e8 bb 04 00 00 call 108150 <gettimeofday>
107c95: 8b 55 c4 mov -0x3c(%ebp),%edx
107c98: 8b 42 50 mov 0x50(%edx),%eax
107c9b: 8b 55 e0 mov -0x20(%ebp),%edx
107c9e: 89 50 48 mov %edx,0x48(%eax)
107ca1: 83 c4 10 add $0x10,%esp
107ca4: eb 8a jmp 107c30 <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 );
107ca6: 83 ec 08 sub $0x8,%esp
107ca9: 56 push %esi
107caa: ff 75 08 pushl 0x8(%ebp)
107cad: 8b 45 d4 mov -0x2c(%ebp),%eax
107cb0: ff 50 34 call *0x34(%eax)
if ( result != 0 )
107cb3: 83 c4 10 add $0x10,%esp
107cb6: 85 c0 test %eax,%eax
107cb8: 0f 84 72 ff ff ff je 107c30 <IMFS_unlink+0x14>
return -1;
107cbe: b8 ff ff ff ff mov $0xffffffff,%eax
107cc3: e9 78 ff ff ff jmp 107c40 <IMFS_unlink+0x24>
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
107cc8: e8 17 b6 00 00 call 1132e4 <__errno> <== NOT EXECUTED
107ccd: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107cd3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
107cd8: e9 63 ff ff ff jmp 107c40 <IMFS_unlink+0x24> <== NOT EXECUTED
00107ce0 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
107ce0: 55 push %ebp
107ce1: 89 e5 mov %esp,%ebp
107ce3: 83 ec 08 sub $0x8,%esp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
107ce6: 8b 45 08 mov 0x8(%ebp),%eax
107ce9: 8b 40 08 mov 0x8(%eax),%eax
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
107cec: 83 78 4c 01 cmpl $0x1,0x4c(%eax)
107cf0: 75 12 jne 107d04 <IMFS_unmount+0x24> <== NEVER TAKEN
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
107cf2: 8b 50 5c mov 0x5c(%eax),%edx
107cf5: 85 d2 test %edx,%edx
107cf7: 74 1d je 107d16 <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;
107cf9: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
return 0;
107d00: 31 c0 xor %eax,%eax
}
107d02: c9 leave
107d03: 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 );
107d04: e8 db b5 00 00 call 1132e4 <__errno> <== NOT EXECUTED
107d09: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED
107d0f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
107d14: c9 leave <== NOT EXECUTED
107d15: 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 */
107d16: e8 c9 b5 00 00 call 1132e4 <__errno> <== NOT EXECUTED
107d1b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
107d21: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
107d26: c9 leave <== NOT EXECUTED
107d27: c3 ret <== NOT EXECUTED
001082fc <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
1082fc: 55 push %ebp
1082fd: 89 e5 mov %esp,%ebp
1082ff: 57 push %edi
108300: 56 push %esi
108301: 53 push %ebx
108302: 83 ec 0c sub $0xc,%esp
108305: 8b 5d 08 mov 0x8(%ebp),%ebx
108308: 8b 75 0c mov 0xc(%ebp),%esi
10830b: 8b 7d 10 mov 0x10(%ebp),%edi
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
10830e: a1 a8 60 12 00 mov 0x1260a8,%eax
108313: 85 c0 test %eax,%eax
108315: 74 02 je 108319 <RTEMS_Malloc_Initialize+0x1d>
(*rtems_malloc_statistics_helpers->initialize)();
108317: ff 10 call *(%eax)
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
108319: e8 76 ff ff ff call 108294 <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
10831e: a1 ac 60 12 00 mov 0x1260ac,%eax
108323: 85 c0 test %eax,%eax
108325: 74 0e je 108335 <RTEMS_Malloc_Initialize+0x39>
heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
108327: 83 ec 08 sub $0x8,%esp
10832a: 57 push %edi
10832b: 53 push %ebx
10832c: ff 10 call *(%eax)
10832e: 89 c3 mov %eax,%ebx
108330: 83 c4 10 add $0x10,%esp
heap_begin,
sbrk_amount
);
heap_size = (uintptr_t) sbrk_amount;
108333: 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 (
108335: 80 3d a4 60 12 00 00 cmpb $0x0,0x1260a4
10833c: 75 1f jne 10835d <RTEMS_Malloc_Initialize+0x61>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
10833e: 80 3d 68 3b 12 00 00 cmpb $0x0,0x123b68
108345: 75 41 jne 108388 <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 );
108347: 6a 04 push $0x4
108349: 56 push %esi
10834a: 53 push %ebx
10834b: ff 35 70 3a 12 00 pushl 0x123a70
108351: e8 de 43 00 00 call 10c734 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
108356: 83 c4 10 add $0x10,%esp
108359: 85 c0 test %eax,%eax
10835b: 74 3e je 10839b <RTEMS_Malloc_Initialize+0x9f>
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
10835d: 8b 1d 00 7d 12 00 mov 0x127d00,%ebx
108363: 83 ec 0c sub $0xc,%esp
108366: ff 35 70 3a 12 00 pushl 0x123a70
10836c: e8 3f 4e 00 00 call 10d1b0 <_Protected_heap_Get_size>
108371: 8d 1c 18 lea (%eax,%ebx,1),%ebx
108374: 89 1d 00 7d 12 00 mov %ebx,0x127d00
10837a: 83 c4 10 add $0x10,%esp
}
10837d: 8d 65 f4 lea -0xc(%ebp),%esp
108380: 5b pop %ebx
108381: 5e pop %esi
108382: 5f pop %edi
108383: c9 leave
108384: c3 ret
108385: 8d 76 00 lea 0x0(%esi),%esi
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
108388: 31 c0 xor %eax,%eax
10838a: 89 df mov %ebx,%edi
10838c: 89 f1 mov %esi,%ecx
10838e: 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 ) {
108390: 80 3d a4 60 12 00 00 cmpb $0x0,0x1260a4
108397: 74 ae je 108347 <RTEMS_Malloc_Initialize+0x4b><== ALWAYS TAKEN
108399: eb c2 jmp 10835d <RTEMS_Malloc_Initialize+0x61><== NOT EXECUTED
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
10839b: 83 ec 0c sub $0xc,%esp
10839e: 6a 1a push $0x1a
1083a0: e8 97 39 00 00 call 10bd3c <rtems_fatal_error_occurred>
00107e10 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
107e10: 55 push %ebp <== NOT EXECUTED
107e11: 89 e5 mov %esp,%ebp <== NOT EXECUTED
107e13: 57 push %edi <== NOT EXECUTED
107e14: 56 push %esi <== NOT EXECUTED
107e15: 53 push %ebx <== NOT EXECUTED
107e16: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED
107e19: 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) {
107e1c: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED
107e1f: 0f 84 37 01 00 00 je 107f5c <Stack_check_Dump_threads_usage+0x14c><== NOT EXECUTED
the_thread = 0;
current = 0;
} else
#endif
{
stack = &the_thread->Start.Initial_stack;
107e25: 8d b3 b8 00 00 00 lea 0xb8(%ebx),%esi <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
107e2b: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED
107e31: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED
107e34: 8b 8b bc 00 00 00 mov 0xbc(%ebx),%ecx <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
107e3a: 8d 51 10 lea 0x10(%ecx),%edx <== NOT EXECUTED
107e3d: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
107e40: 8b 3e mov (%esi),%edi <== NOT EXECUTED
107e42: 83 ef 10 sub $0x10,%edi <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
107e45: 8d 41 20 lea 0x20(%ecx),%eax <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
107e48: 89 fa mov %edi,%edx <== NOT EXECUTED
107e4a: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED
107e4d: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED
107e50: 39 d0 cmp %edx,%eax <== NOT EXECUTED
107e52: 73 23 jae 107e77 <Stack_check_Dump_threads_usage+0x67><== NOT EXECUTED
if (*base != U32_PATTERN)
107e54: 81 79 20 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x20(%ecx) <== NOT EXECUTED
107e5b: 74 13 je 107e70 <Stack_check_Dump_threads_usage+0x60><== NOT EXECUTED
107e5d: e9 a2 00 00 00 jmp 107f04 <Stack_check_Dump_threads_usage+0xf4><== NOT EXECUTED
107e62: 66 90 xchg %ax,%ax <== NOT EXECUTED
107e64: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED
107e6a: 0f 85 94 00 00 00 jne 107f04 <Stack_check_Dump_threads_usage+0xf4><== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
107e70: 83 c0 04 add $0x4,%eax <== NOT EXECUTED
107e73: 39 c2 cmp %eax,%edx <== NOT EXECUTED
107e75: 77 ed ja 107e64 <Stack_check_Dump_threads_usage+0x54><== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
107e77: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
107e7e: 85 db test %ebx,%ebx <== NOT EXECUTED
107e80: 0f 84 98 00 00 00 je 107f1e <Stack_check_Dump_threads_usage+0x10e><== NOT EXECUTED
#endif
{
(*print_handler)(
107e86: a1 64 a6 12 00 mov 0x12a664,%eax <== NOT EXECUTED
107e8b: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED
107e8e: 50 push %eax <== NOT EXECUTED
107e8f: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED
107e92: 50 push %eax <== NOT EXECUTED
107e93: 6a 05 push $0x5 <== NOT EXECUTED
107e95: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
107e98: e8 47 5f 00 00 call 10dde4 <rtems_object_get_name> <== NOT EXECUTED
107e9d: 50 push %eax <== NOT EXECUTED
107e9e: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
107ea1: 68 13 3e 12 00 push $0x123e13 <== NOT EXECUTED
107ea6: ff 35 60 a6 12 00 pushl 0x12a660 <== NOT EXECUTED
107eac: ff 55 cc call *-0x34(%ebp) <== NOT EXECUTED
107eaf: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
(*print_handler)(
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
107eb2: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
107eb5: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107eb8: 57 push %edi <== NOT EXECUTED
107eb9: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
107ebc: 8b 16 mov (%esi),%edx <== NOT EXECUTED
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
#endif
(*print_handler)(
107ebe: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED
107ec2: 52 push %edx <== NOT EXECUTED
107ec3: 50 push %eax <== NOT EXECUTED
107ec4: 68 2e 3e 12 00 push $0x123e2e <== NOT EXECUTED
107ec9: ff 35 60 a6 12 00 pushl 0x12a660 <== NOT EXECUTED
107ecf: ff 15 64 a6 12 00 call *0x12a664 <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
107ed5: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
107ed8: 8b 15 68 a6 12 00 mov 0x12a668,%edx <== NOT EXECUTED
107ede: 85 d2 test %edx,%edx <== NOT EXECUTED
107ee0: 74 5a je 107f3c <Stack_check_Dump_threads_usage+0x12c><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
107ee2: 50 push %eax <== NOT EXECUTED
107ee3: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
107ee6: 68 59 3e 12 00 push $0x123e59 <== NOT EXECUTED
107eeb: ff 35 60 a6 12 00 pushl 0x12a660 <== NOT EXECUTED
107ef1: ff 15 64 a6 12 00 call *0x12a664 <== NOT EXECUTED
107ef7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
107efa: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107efd: 5b pop %ebx <== NOT EXECUTED
107efe: 5e pop %esi <== NOT EXECUTED
107eff: 5f pop %edi <== NOT EXECUTED
107f00: c9 leave <== NOT EXECUTED
107f01: c3 ret <== NOT EXECUTED
107f02: 66 90 xchg %ax,%ax <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
107f04: 85 c0 test %eax,%eax <== NOT EXECUTED
107f06: 0f 84 6b ff ff ff je 107e77 <Stack_check_Dump_threads_usage+0x67><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
107f0c: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED
107f0f: 01 fa add %edi,%edx <== NOT EXECUTED
107f11: 29 c2 sub %eax,%edx <== NOT EXECUTED
107f13: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED
else
used = 0;
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if ( the_thread )
107f16: 85 db test %ebx,%ebx <== NOT EXECUTED
107f18: 0f 85 68 ff ff ff jne 107e86 <Stack_check_Dump_threads_usage+0x76><== NOT EXECUTED
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
}
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
107f1e: 51 push %ecx <== NOT EXECUTED
107f1f: 6a ff push $0xffffffff <== NOT EXECUTED
107f21: 68 20 3e 12 00 push $0x123e20 <== NOT EXECUTED
107f26: ff 35 60 a6 12 00 pushl 0x12a660 <== NOT EXECUTED
107f2c: ff 15 64 a6 12 00 call *0x12a664 <== NOT EXECUTED
107f32: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
107f35: e9 78 ff ff ff jmp 107eb2 <Stack_check_Dump_threads_usage+0xa2><== NOT EXECUTED
107f3a: 66 90 xchg %ax,%ax <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
107f3c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
107f3f: 68 4c 3e 12 00 push $0x123e4c <== NOT EXECUTED
107f44: ff 35 60 a6 12 00 pushl 0x12a660 <== NOT EXECUTED
107f4a: ff 15 64 a6 12 00 call *0x12a664 <== NOT EXECUTED
107f50: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
107f53: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
107f56: 5b pop %ebx <== NOT EXECUTED
107f57: 5e pop %esi <== NOT EXECUTED
107f58: 5f pop %edi <== NOT EXECUTED
107f59: c9 leave <== NOT EXECUTED
107f5a: c3 ret <== NOT EXECUTED
107f5b: 90 nop <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
107f5c: 8b 0d d4 a9 12 00 mov 0x12a9d4,%ecx <== NOT EXECUTED
107f62: 85 c9 test %ecx,%ecx <== NOT EXECUTED
107f64: 74 94 je 107efa <Stack_check_Dump_threads_usage+0xea><== NOT EXECUTED
return;
stack = &Stack_check_Interrupt_stack;
107f66: be d0 a9 12 00 mov $0x12a9d0,%esi <== NOT EXECUTED
the_thread = 0;
current = 0;
107f6b: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
return;
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
107f72: 31 db xor %ebx,%ebx <== NOT EXECUTED
107f74: e9 c1 fe ff ff jmp 107e3a <Stack_check_Dump_threads_usage+0x2a><== NOT EXECUTED
00107f7c <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
107f7c: 55 push %ebp
107f7d: 89 e5 mov %esp,%ebp
107f7f: 57 push %edi
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if ( Stack_check_Initialized )
107f80: 8b 15 68 a6 12 00 mov 0x12a668,%edx
107f86: 85 d2 test %edx,%edx
107f88: 75 5a jne 107fe4 <Stack_check_Initialize+0x68>
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
107f8a: c7 05 c0 a9 12 00 0d movl $0xfeedf00d,0x12a9c0
107f91: f0 ed fe
107f94: c7 05 c4 a9 12 00 06 movl $0xbad0d06,0x12a9c4
107f9b: 0d ad 0b
107f9e: c7 05 c8 a9 12 00 0d movl $0xdeadf00d,0x12a9c8
107fa5: f0 ad de
107fa8: c7 05 cc a9 12 00 06 movl $0x600d0d06,0x12a9cc
107faf: 0d 0d 60
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
107fb2: 8b 15 6c b1 12 00 mov 0x12b16c,%edx
107fb8: 85 d2 test %edx,%edx
107fba: 74 1e je 107fda <Stack_check_Initialize+0x5e><== NEVER TAKEN
107fbc: 8b 0d 70 b1 12 00 mov 0x12b170,%ecx
107fc2: 85 c9 test %ecx,%ecx
107fc4: 74 14 je 107fda <Stack_check_Initialize+0x5e><== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
107fc6: 89 15 d4 a9 12 00 mov %edx,0x12a9d4
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
107fcc: 29 d1 sub %edx,%ecx
107fce: 89 0d d0 a9 12 00 mov %ecx,0x12a9d0
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
107fd4: b0 a5 mov $0xa5,%al
107fd6: 89 d7 mov %edx,%edi
107fd8: f3 aa rep stos %al,%es:(%edi)
}
#endif
Stack_check_Initialized = 1;
107fda: c7 05 68 a6 12 00 01 movl $0x1,0x12a668
107fe1: 00 00 00
}
107fe4: 5f pop %edi
107fe5: c9 leave
107fe6: c3 ret
00108038 <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)
{
108038: 55 push %ebp <== NOT EXECUTED
108039: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10803b: 56 push %esi <== NOT EXECUTED
10803c: 53 push %ebx <== NOT EXECUTED
10803d: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED
108040: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED
108043: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern(stack);
108046: 8b b3 bc 00 00 00 mov 0xbc(%ebx),%esi <== NOT EXECUTED
char name[32];
printk("BLOWN STACK!!!\n");
10804c: 68 5f 3e 12 00 push $0x123e5f <== NOT EXECUTED
108051: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED
108054: e8 f3 1b 00 00 call 109c4c <printk> <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
108059: 5a pop %edx <== NOT EXECUTED
10805a: 59 pop %ecx <== NOT EXECUTED
10805b: 53 push %ebx <== NOT EXECUTED
10805c: 68 6f 3e 12 00 push $0x123e6f <== NOT EXECUTED
108061: e8 e6 1b 00 00 call 109c4c <printk> <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
108066: 59 pop %ecx <== NOT EXECUTED
108067: 58 pop %eax <== NOT EXECUTED
108068: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
10806b: 68 8c 3e 12 00 push $0x123e8c <== NOT EXECUTED
108070: e8 d7 1b 00 00 call 109c4c <printk> <== NOT EXECUTED
printk(
108075: 58 pop %eax <== NOT EXECUTED
108076: 5a pop %edx <== NOT EXECUTED
108077: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED
10807a: 68 9e 3e 12 00 push $0x123e9e <== NOT EXECUTED
10807f: e8 c8 1b 00 00 call 109c4c <printk> <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
108084: 83 c4 0c add $0xc,%esp <== NOT EXECUTED
108087: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED
10808a: 50 push %eax <== NOT EXECUTED
10808b: 6a 20 push $0x20 <== NOT EXECUTED
10808d: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED
108090: e8 4f 5d 00 00 call 10dde4 <rtems_object_get_name> <== NOT EXECUTED
108095: 5a pop %edx <== NOT EXECUTED
108096: 59 pop %ecx <== NOT EXECUTED
108097: 50 push %eax <== NOT EXECUTED
108098: 68 b2 3e 12 00 push $0x123eb2 <== NOT EXECUTED
10809d: e8 aa 1b 00 00 call 109c4c <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)
1080a2: 8b 8b bc 00 00 00 mov 0xbc(%ebx),%ecx <== NOT EXECUTED
1080a8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
1080ae: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED
1080b1: 53 push %ebx <== NOT EXECUTED
1080b2: 51 push %ecx <== NOT EXECUTED
1080b3: 50 push %eax <== NOT EXECUTED
1080b4: 68 e0 3e 12 00 push $0x123ee0 <== NOT EXECUTED
1080b9: e8 8e 1b 00 00 call 109c4c <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) {
1080be: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
1080c1: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED
1080c4: 84 d2 test %dl,%dl <== NOT EXECUTED
1080c6: 74 10 je 1080d8 <Stack_check_report_blown_task+0xa0><== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
1080c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1080cb: 68 81 00 00 00 push $0x81 <== NOT EXECUTED
1080d0: e8 1f 65 00 00 call 10e5f4 <rtems_fatal_error_occurred><== NOT EXECUTED
1080d5: 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(stack);
1080d8: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
1080db: 83 c6 18 add $0x18,%esi <== NOT EXECUTED
1080de: 56 push %esi <== NOT EXECUTED
1080df: 50 push %eax <== NOT EXECUTED
1080e0: 6a 10 push $0x10 <== NOT EXECUTED
1080e2: 68 14 3f 12 00 push $0x123f14 <== NOT EXECUTED
1080e7: e8 60 1b 00 00 call 109c4c <printk> <== NOT EXECUTED
1080ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1080ef: eb d7 jmp 1080c8 <Stack_check_report_blown_task+0x90><== NOT EXECUTED
0010bee4 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
10bee4: 55 push %ebp
10bee5: 89 e5 mov %esp,%ebp
10bee7: 53 push %ebx
10bee8: 83 ec 04 sub $0x4,%esp
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10beeb: 8b 1d 78 80 12 00 mov 0x128078,%ebx
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10bef1: 81 fb 7c 80 12 00 cmp $0x12807c,%ebx
10bef7: 74 10 je 10bf09 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN
10bef9: 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)();
10befc: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10beff: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10bf01: 81 fb 7c 80 12 00 cmp $0x12807c,%ebx
10bf07: 75 f3 jne 10befc <_API_extensions_Run_postdriver+0x18>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
10bf09: 58 pop %eax
10bf0a: 5b pop %ebx
10bf0b: c9 leave
10bf0c: c3 ret
0010bf10 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
10bf10: 55 push %ebp
10bf11: 89 e5 mov %esp,%ebp
10bf13: 53 push %ebx
10bf14: 83 ec 04 sub $0x4,%esp
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10bf17: 8b 1d 78 80 12 00 mov 0x128078,%ebx
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10bf1d: 81 fb 7c 80 12 00 cmp $0x12807c,%ebx
10bf23: 74 1c je 10bf41 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN
10bf25: 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 );
10bf28: 83 ec 0c sub $0xc,%esp
10bf2b: ff 35 f8 83 12 00 pushl 0x1283f8
10bf31: ff 53 0c call *0xc(%ebx)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
10bf34: 8b 1b mov (%ebx),%ebx
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
10bf36: 83 c4 10 add $0x10,%esp
10bf39: 81 fb 7c 80 12 00 cmp $0x12807c,%ebx
10bf3f: 75 e7 jne 10bf28 <_API_extensions_Run_postswitch+0x18>
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
10bf41: 8b 5d fc mov -0x4(%ebp),%ebx
10bf44: c9 leave
10bf45: c3 ret
0010e428 <_CORE_RWLock_Obtain_for_reading>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10e428: 55 push %ebp
10e429: 89 e5 mov %esp,%ebp
10e42b: 57 push %edi
10e42c: 56 push %esi
10e42d: 53 push %ebx
10e42e: 83 ec 1c sub $0x1c,%esp
10e431: 8b 5d 08 mov 0x8(%ebp),%ebx
10e434: 8b 7d 0c mov 0xc(%ebp),%edi
10e437: 8b 4d 14 mov 0x14(%ebp),%ecx
10e43a: 8a 55 10 mov 0x10(%ebp),%dl
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e43d: 8b 35 78 bd 12 00 mov 0x12bd78,%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 );
10e443: 9c pushf
10e444: fa cli
10e445: 8f 45 e4 popl -0x1c(%ebp)
switch ( the_rwlock->current_state ) {
10e448: 8b 43 44 mov 0x44(%ebx),%eax
10e44b: 85 c0 test %eax,%eax
10e44d: 75 1d jne 10e46c <_CORE_RWLock_Obtain_for_reading+0x44>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10e44f: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
the_rwlock->number_of_readers += 1;
10e456: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10e459: ff 75 e4 pushl -0x1c(%ebp)
10e45c: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e45d: 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 */
}
10e464: 8d 65 f4 lea -0xc(%ebp),%esp
10e467: 5b pop %ebx
10e468: 5e pop %esi
10e469: 5f pop %edi
10e46a: c9 leave
10e46b: 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 ) {
10e46c: 48 dec %eax
10e46d: 74 51 je 10e4c0 <_CORE_RWLock_Obtain_for_reading+0x98>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10e46f: 84 d2 test %dl,%dl
10e471: 75 15 jne 10e488 <_CORE_RWLock_Obtain_for_reading+0x60>
_ISR_Enable( level );
10e473: ff 75 e4 pushl -0x1c(%ebp)
10e476: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e477: 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 */
}
10e47e: 8d 65 f4 lea -0xc(%ebp),%esp
10e481: 5b pop %ebx
10e482: 5e pop %esi
10e483: 5f pop %edi
10e484: c9 leave
10e485: c3 ret
10e486: 66 90 xchg %ax,%ax
10e488: 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;
10e48f: 89 5e 44 mov %ebx,0x44(%esi)
executing->Wait.id = id;
10e492: 89 7e 20 mov %edi,0x20(%esi)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
10e495: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e49c: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
_ISR_Enable( level );
10e4a3: ff 75 e4 pushl -0x1c(%ebp)
10e4a6: 9d popf
_Thread_queue_Enqueue_with_handler(
10e4a7: c7 45 10 2c e6 10 00 movl $0x10e62c,0x10(%ebp)
10e4ae: 89 4d 0c mov %ecx,0xc(%ebp)
10e4b1: 89 5d 08 mov %ebx,0x8(%ebp)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e4b4: 8d 65 f4 lea -0xc(%ebp),%esp
10e4b7: 5b pop %ebx
10e4b8: 5e pop %esi
10e4b9: 5f pop %edi
10e4ba: 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(
10e4bb: e9 30 1c 00 00 jmp 1100f0 <_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 );
10e4c0: 83 ec 0c sub $0xc,%esp
10e4c3: 53 push %ebx
10e4c4: 88 55 e0 mov %dl,-0x20(%ebp)
10e4c7: 89 4d dc mov %ecx,-0x24(%ebp)
10e4ca: e8 49 1f 00 00 call 110418 <_Thread_queue_First>
if ( !waiter ) {
10e4cf: 83 c4 10 add $0x10,%esp
10e4d2: 85 c0 test %eax,%eax
10e4d4: 8a 55 e0 mov -0x20(%ebp),%dl
10e4d7: 8b 4d dc mov -0x24(%ebp),%ecx
10e4da: 75 93 jne 10e46f <_CORE_RWLock_Obtain_for_reading+0x47>
the_rwlock->number_of_readers += 1;
10e4dc: ff 43 48 incl 0x48(%ebx)
_ISR_Enable( level );
10e4df: ff 75 e4 pushl -0x1c(%ebp)
10e4e2: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e4e3: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi)
return;
10e4ea: e9 75 ff ff ff jmp 10e464 <_CORE_RWLock_Obtain_for_reading+0x3c>
0010e4f0 <_CORE_RWLock_Obtain_for_writing>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
10e4f0: 55 push %ebp
10e4f1: 89 e5 mov %esp,%ebp
10e4f3: 57 push %edi
10e4f4: 56 push %esi
10e4f5: 53 push %ebx
10e4f6: 83 ec 0c sub $0xc,%esp
10e4f9: 8b 45 08 mov 0x8(%ebp),%eax
10e4fc: 8b 7d 0c mov 0xc(%ebp),%edi
10e4ff: 8b 75 14 mov 0x14(%ebp),%esi
10e502: 8a 5d 10 mov 0x10(%ebp),%bl
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e505: 8b 15 78 bd 12 00 mov 0x12bd78,%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 );
10e50b: 9c pushf
10e50c: fa cli
10e50d: 59 pop %ecx
switch ( the_rwlock->current_state ) {
10e50e: 83 78 44 00 cmpl $0x0,0x44(%eax)
10e512: 75 18 jne 10e52c <_CORE_RWLock_Obtain_for_writing+0x3c>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
10e514: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax)
_ISR_Enable( level );
10e51b: 51 push %ecx
10e51c: 9d popf
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e51d: 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 */
}
10e524: 83 c4 0c add $0xc,%esp
10e527: 5b pop %ebx
10e528: 5e pop %esi
10e529: 5f pop %edi
10e52a: c9 leave
10e52b: c3 ret
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
10e52c: 84 db test %bl,%bl
10e52e: 75 14 jne 10e544 <_CORE_RWLock_Obtain_for_writing+0x54>
_ISR_Enable( level );
10e530: 51 push %ecx
10e531: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e532: 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 */
}
10e539: 83 c4 0c add $0xc,%esp
10e53c: 5b pop %ebx
10e53d: 5e pop %esi
10e53e: 5f pop %edi
10e53f: c9 leave
10e540: c3 ret
10e541: 8d 76 00 lea 0x0(%esi),%esi
10e544: 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;
10e54b: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10e54e: 89 7a 20 mov %edi,0x20(%edx)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
10e551: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e558: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Enable( level );
10e55f: 51 push %ecx
10e560: 9d popf
_Thread_queue_Enqueue_with_handler(
10e561: c7 45 10 2c e6 10 00 movl $0x10e62c,0x10(%ebp)
10e568: 89 75 0c mov %esi,0xc(%ebp)
10e56b: 89 45 08 mov %eax,0x8(%ebp)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
10e56e: 83 c4 0c add $0xc,%esp
10e571: 5b pop %ebx
10e572: 5e pop %esi
10e573: 5f pop %edi
10e574: 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(
10e575: e9 76 1b 00 00 jmp 1100f0 <_Thread_queue_Enqueue_with_handler>
0010e57c <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
10e57c: 55 push %ebp
10e57d: 89 e5 mov %esp,%ebp
10e57f: 53 push %ebx
10e580: 83 ec 04 sub $0x4,%esp
10e583: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
10e586: 8b 0d 78 bd 12 00 mov 0x12bd78,%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 );
10e58c: 9c pushf
10e58d: fa cli
10e58e: 5a pop %edx
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
10e58f: 8b 43 44 mov 0x44(%ebx),%eax
10e592: 85 c0 test %eax,%eax
10e594: 74 7a je 10e610 <_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 ) {
10e596: 48 dec %eax
10e597: 74 63 je 10e5fc <_CORE_RWLock_Release+0x80>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
10e599: 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;
10e5a0: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
_ISR_Enable( level );
10e5a7: 52 push %edx
10e5a8: 9d popf
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
10e5a9: 83 ec 0c sub $0xc,%esp
10e5ac: 53 push %ebx
10e5ad: e8 16 1a 00 00 call 10ffc8 <_Thread_queue_Dequeue>
if ( next ) {
10e5b2: 83 c4 10 add $0x10,%esp
10e5b5: 85 c0 test %eax,%eax
10e5b7: 74 39 je 10e5f2 <_CORE_RWLock_Release+0x76>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
10e5b9: 83 78 30 01 cmpl $0x1,0x30(%eax)
10e5bd: 74 61 je 10e620 <_CORE_RWLock_Release+0xa4>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
10e5bf: ff 43 48 incl 0x48(%ebx)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
10e5c2: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx)
10e5c9: eb 17 jmp 10e5e2 <_CORE_RWLock_Release+0x66>
10e5cb: 90 nop
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
10e5cc: 83 78 30 01 cmpl $0x1,0x30(%eax)
10e5d0: 74 20 je 10e5f2 <_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;
10e5d2: ff 43 48 incl 0x48(%ebx)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
10e5d5: 83 ec 08 sub $0x8,%esp
10e5d8: 50 push %eax
10e5d9: 53 push %ebx
10e5da: e8 21 1d 00 00 call 110300 <_Thread_queue_Extract>
}
10e5df: 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 );
10e5e2: 83 ec 0c sub $0xc,%esp
10e5e5: 53 push %ebx
10e5e6: e8 2d 1e 00 00 call 110418 <_Thread_queue_First>
if ( !next ||
10e5eb: 83 c4 10 add $0x10,%esp
10e5ee: 85 c0 test %eax,%eax
10e5f0: 75 da jne 10e5cc <_CORE_RWLock_Release+0x50>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e5f2: 31 c0 xor %eax,%eax
10e5f4: 8b 5d fc mov -0x4(%ebp),%ebx
10e5f7: c9 leave
10e5f8: c3 ret
10e5f9: 8d 76 00 lea 0x0(%esi),%esi
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
10e5fc: 8b 43 48 mov 0x48(%ebx),%eax
10e5ff: 48 dec %eax
10e600: 89 43 48 mov %eax,0x48(%ebx)
if ( the_rwlock->number_of_readers != 0 ) {
10e603: 85 c0 test %eax,%eax
10e605: 74 92 je 10e599 <_CORE_RWLock_Release+0x1d>
/* must be unlocked again */
_ISR_Enable( level );
10e607: 52 push %edx
10e608: 9d popf
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e609: 31 c0 xor %eax,%eax
10e60b: 8b 5d fc mov -0x4(%ebp),%ebx
10e60e: c9 leave
10e60f: c3 ret
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
10e610: 52 push %edx
10e611: 9d popf
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
10e612: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
10e619: 31 c0 xor %eax,%eax
10e61b: 8b 5d fc mov -0x4(%ebp),%ebx
10e61e: c9 leave
10e61f: 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;
10e620: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx)
return CORE_RWLOCK_SUCCESSFUL;
10e627: eb c9 jmp 10e5f2 <_CORE_RWLock_Release+0x76>
0010e62c <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
10e62c: 55 push %ebp
10e62d: 89 e5 mov %esp,%ebp
10e62f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10e632: 8d 45 f4 lea -0xc(%ebp),%eax
10e635: 50 push %eax
10e636: ff 75 08 pushl 0x8(%ebp)
10e639: e8 2e 16 00 00 call 10fc6c <_Thread_Get>
switch ( location ) {
10e63e: 83 c4 10 add $0x10,%esp
10e641: 8b 55 f4 mov -0xc(%ebp),%edx
10e644: 85 d2 test %edx,%edx
10e646: 75 17 jne 10e65f <_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 );
10e648: 83 ec 0c sub $0xc,%esp
10e64b: 50 push %eax
10e64c: e8 a7 1e 00 00 call 1104f8 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10e651: a1 d0 b7 12 00 mov 0x12b7d0,%eax
10e656: 48 dec %eax
10e657: a3 d0 b7 12 00 mov %eax,0x12b7d0
10e65c: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10e65f: c9 leave
10e660: c3 ret
00119924 <_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
)
{
119924: 55 push %ebp
119925: 89 e5 mov %esp,%ebp
119927: 57 push %edi
119928: 56 push %esi
119929: 53 push %ebx
11992a: 83 ec 1c sub $0x1c,%esp
11992d: 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 ) {
119930: 8b 45 10 mov 0x10(%ebp),%eax
119933: 39 43 4c cmp %eax,0x4c(%ebx)
119936: 72 60 jb 119998 <_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 ) {
119938: 8b 43 48 mov 0x48(%ebx),%eax
11993b: 85 c0 test %eax,%eax
11993d: 75 45 jne 119984 <_CORE_message_queue_Broadcast+0x60>
11993f: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
119946: eb 18 jmp 119960 <_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;
119948: ff 45 e4 incl -0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
11994b: 8b 42 2c mov 0x2c(%edx),%eax
11994e: 89 c7 mov %eax,%edi
119950: 8b 75 0c mov 0xc(%ebp),%esi
119953: 8b 4d 10 mov 0x10(%ebp),%ecx
119956: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
119958: 8b 42 28 mov 0x28(%edx),%eax
11995b: 8b 55 10 mov 0x10(%ebp),%edx
11995e: 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 =
119960: 83 ec 0c sub $0xc,%esp
119963: 53 push %ebx
119964: e8 d7 28 00 00 call 11c240 <_Thread_queue_Dequeue>
119969: 89 c2 mov %eax,%edx
11996b: 83 c4 10 add $0x10,%esp
11996e: 85 c0 test %eax,%eax
119970: 75 d6 jne 119948 <_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;
119972: 8b 55 e4 mov -0x1c(%ebp),%edx
119975: 8b 45 1c mov 0x1c(%ebp),%eax
119978: 89 10 mov %edx,(%eax)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
11997a: 31 c0 xor %eax,%eax
}
11997c: 8d 65 f4 lea -0xc(%ebp),%esp
11997f: 5b pop %ebx
119980: 5e pop %esi
119981: 5f pop %edi
119982: c9 leave
119983: 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;
119984: 8b 55 1c mov 0x1c(%ebp),%edx
119987: c7 02 00 00 00 00 movl $0x0,(%edx)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
11998d: 31 c0 xor %eax,%eax
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
11998f: 8d 65 f4 lea -0xc(%ebp),%esp
119992: 5b pop %ebx
119993: 5e pop %esi
119994: 5f pop %edi
119995: c9 leave
119996: c3 ret
119997: 90 nop
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;
119998: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
11999d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1199a0: 5b pop %ebx <== NOT EXECUTED
1199a1: 5e pop %esi <== NOT EXECUTED
1199a2: 5f pop %edi <== NOT EXECUTED
1199a3: c9 leave <== NOT EXECUTED
1199a4: c3 ret <== NOT EXECUTED
00114a64 <_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
)
{
114a64: 55 push %ebp
114a65: 89 e5 mov %esp,%ebp
114a67: 57 push %edi
114a68: 56 push %esi
114a69: 53 push %ebx
114a6a: 83 ec 0c sub $0xc,%esp
114a6d: 8b 5d 08 mov 0x8(%ebp),%ebx
114a70: 8b 75 10 mov 0x10(%ebp),%esi
114a73: 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;
114a76: 89 73 44 mov %esi,0x44(%ebx)
the_message_queue->number_of_pending_messages = 0;
114a79: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx)
the_message_queue->maximum_message_size = maximum_message_size;
114a80: 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;
114a83: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx)
the_message_queue->notify_argument = the_argument;
114a8a: 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)) {
114a91: a8 03 test $0x3,%al
114a93: 74 17 je 114aac <_CORE_message_queue_Initialize+0x48>
allocated_message_size += sizeof(uint32_t);
114a95: 8d 50 04 lea 0x4(%eax),%edx
allocated_message_size &= ~(sizeof(uint32_t) - 1);
114a98: 83 e2 fc and $0xfffffffc,%edx
}
if (allocated_message_size < maximum_message_size)
114a9b: 39 d0 cmp %edx,%eax
114a9d: 76 0f jbe 114aae <_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;
114a9f: 31 c0 xor %eax,%eax
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
114aa1: 8d 65 f4 lea -0xc(%ebp),%esp
114aa4: 5b pop %ebx
114aa5: 5e pop %esi
114aa6: 5f pop %edi
114aa7: c9 leave
114aa8: c3 ret
114aa9: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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)) {
114aac: 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));
114aae: 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 *
114ab1: 89 f8 mov %edi,%eax
114ab3: 0f af c6 imul %esi,%eax
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
114ab6: 39 d0 cmp %edx,%eax
114ab8: 72 e5 jb 114a9f <_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 );
114aba: 83 ec 0c sub $0xc,%esp
114abd: 50 push %eax
114abe: e8 61 2b 00 00 call 117624 <_Workspace_Allocate>
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
114ac3: 89 43 5c mov %eax,0x5c(%ebx)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
114ac6: 83 c4 10 add $0x10,%esp
114ac9: 85 c0 test %eax,%eax
114acb: 74 d2 je 114a9f <_CORE_message_queue_Initialize+0x3b>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
114acd: 57 push %edi
114ace: 56 push %esi
114acf: 50 push %eax
114ad0: 8d 43 68 lea 0x68(%ebx),%eax
114ad3: 50 push %eax
114ad4: e8 5f 52 00 00 call 119d38 <_Chain_Initialize>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
114ad9: 8d 43 54 lea 0x54(%ebx),%eax
114adc: 89 43 50 mov %eax,0x50(%ebx)
head->next = tail;
head->previous = NULL;
114adf: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
114ae6: 8d 43 50 lea 0x50(%ebx),%eax
114ae9: 89 43 58 mov %eax,0x58(%ebx)
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
114aec: 6a 06 push $0x6
114aee: 68 80 00 00 00 push $0x80
114af3: 8b 45 0c mov 0xc(%ebp),%eax
114af6: 83 38 01 cmpl $0x1,(%eax)
114af9: 0f 94 c0 sete %al
114afc: 0f b6 c0 movzbl %al,%eax
114aff: 50 push %eax
114b00: 53 push %ebx
114b01: e8 52 22 00 00 call 116d58 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
114b06: 83 c4 20 add $0x20,%esp
114b09: b0 01 mov $0x1,%al
}
114b0b: 8d 65 f4 lea -0xc(%ebp),%esp
114b0e: 5b pop %ebx
114b0f: 5e pop %esi
114b10: 5f pop %edi
114b11: c9 leave
114b12: c3 ret
00111140 <_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
)
{
111140: 55 push %ebp
111141: 89 e5 mov %esp,%ebp
111143: 56 push %esi
111144: 53 push %ebx
111145: 83 ec 10 sub $0x10,%esp
111148: 8b 45 08 mov 0x8(%ebp),%eax
11114b: 8b 55 0c mov 0xc(%ebp),%edx
11114e: 8b 4d 10 mov 0x10(%ebp),%ecx
111151: 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 ) {
111154: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx
11115a: 74 70 je 1111cc <_CORE_message_queue_Insert_message+0x8c>
_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 ) {
11115c: 81 f9 00 00 00 80 cmp $0x80000000,%ecx
111162: 0f 84 88 00 00 00 je 1111f0 <_CORE_message_queue_Insert_message+0xb0>
* 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);
#endif
}
111168: 8b 58 50 mov 0x50(%eax),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
11116b: 8d 70 54 lea 0x54(%eax),%esi
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = _Chain_First( the_header );
while ( !_Chain_Is_tail( the_header, the_node ) ) {
11116e: 39 de cmp %ebx,%esi
111170: 74 05 je 111177 <_CORE_message_queue_Insert_message+0x37>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
111172: 3b 4b 08 cmp 0x8(%ebx),%ecx
111175: 7d 45 jge 1111bc <_CORE_message_queue_Insert_message+0x7c>
the_node = the_node->next;
continue;
}
break;
}
_ISR_Disable( level );
111177: 9c pushf
111178: fa cli
111179: 5e pop %esi
SET_NOTIFY();
11117a: 8b 48 48 mov 0x48(%eax),%ecx
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
11117d: 85 c9 test %ecx,%ecx
11117f: 0f 94 45 f7 sete -0x9(%ebp)
}
break;
}
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
111183: 41 inc %ecx
111184: 89 48 48 mov %ecx,0x48(%eax)
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
111187: 8b 4b 04 mov 0x4(%ebx),%ecx
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
11118a: 89 4a 04 mov %ecx,0x4(%edx)
before_node = after_node->next;
11118d: 8b 19 mov (%ecx),%ebx
after_node->next = the_node;
11118f: 89 11 mov %edx,(%ecx)
the_node->next = before_node;
111191: 89 1a mov %ebx,(%edx)
before_node->previous = the_node;
111193: 89 53 04 mov %edx,0x4(%ebx)
_ISR_Enable( level );
111196: 56 push %esi
111197: 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 )
111198: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
11119c: 74 16 je 1111b4 <_CORE_message_queue_Insert_message+0x74>
11119e: 8b 50 60 mov 0x60(%eax),%edx
1111a1: 85 d2 test %edx,%edx
1111a3: 74 0f je 1111b4 <_CORE_message_queue_Insert_message+0x74>
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
1111a5: 8b 40 64 mov 0x64(%eax),%eax
1111a8: 89 45 08 mov %eax,0x8(%ebp)
#endif
}
1111ab: 83 c4 10 add $0x10,%esp
1111ae: 5b pop %ebx
1111af: 5e pop %esi
1111b0: 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);
1111b1: ff e2 jmp *%edx
1111b3: 90 nop
#endif
}
1111b4: 83 c4 10 add $0x10,%esp
1111b7: 5b pop %ebx
1111b8: 5e pop %esi
1111b9: c9 leave
1111ba: c3 ret
1111bb: 90 nop
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;
1111bc: 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 = _Chain_First( the_header );
while ( !_Chain_Is_tail( the_header, the_node ) ) {
1111be: 39 de cmp %ebx,%esi
1111c0: 74 b5 je 111177 <_CORE_message_queue_Insert_message+0x37>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
1111c2: 3b 4b 08 cmp 0x8(%ebx),%ecx
1111c5: 7c b0 jl 111177 <_CORE_message_queue_Insert_message+0x37>
1111c7: eb f3 jmp 1111bc <_CORE_message_queue_Insert_message+0x7c>
1111c9: 8d 76 00 lea 0x0(%esi),%esi
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 );
1111cc: 9c pushf
1111cd: fa cli
1111ce: 5b pop %ebx
SET_NOTIFY();
1111cf: 8b 48 48 mov 0x48(%eax),%ecx
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
1111d2: 85 c9 test %ecx,%ecx
1111d4: 0f 94 45 f7 sete -0x9(%ebp)
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
1111d8: 41 inc %ecx
1111d9: 89 48 48 mov %ecx,0x48(%eax)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
1111dc: 8b 48 58 mov 0x58(%eax),%ecx
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
1111df: 8d 70 54 lea 0x54(%eax),%esi
1111e2: 89 32 mov %esi,(%edx)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
1111e4: 89 50 58 mov %edx,0x58(%eax)
old_last->next = the_node;
1111e7: 89 11 mov %edx,(%ecx)
the_node->previous = old_last;
1111e9: 89 4a 04 mov %ecx,0x4(%edx)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
1111ec: 53 push %ebx
1111ed: 9d popf
1111ee: eb a8 jmp 111198 <_CORE_message_queue_Insert_message+0x58>
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
_ISR_Disable( level );
1111f0: 9c pushf
1111f1: fa cli
1111f2: 5b pop %ebx
SET_NOTIFY();
1111f3: 8b 48 48 mov 0x48(%eax),%ecx
*
* INTERRUPT LATENCY:
* insert
*/
void _CORE_message_queue_Insert_message(
1111f6: 85 c9 test %ecx,%ecx
1111f8: 0f 94 45 f7 sete -0x9(%ebp)
_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 );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
1111fc: 41 inc %ecx
1111fd: 89 48 48 mov %ecx,0x48(%eax)
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
111200: 8d 48 50 lea 0x50(%eax),%ecx
111203: 89 4a 04 mov %ecx,0x4(%edx)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
111206: 8b 48 50 mov 0x50(%eax),%ecx
after_node->next = the_node;
111209: 89 50 50 mov %edx,0x50(%eax)
the_node->next = before_node;
11120c: 89 0a mov %ecx,(%edx)
before_node->previous = the_node;
11120e: 89 51 04 mov %edx,0x4(%ecx)
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
111211: 53 push %ebx
111212: 9d popf
111213: eb 83 jmp 111198 <_CORE_message_queue_Insert_message+0x58>
00114b14 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
114b14: 55 push %ebp
114b15: 89 e5 mov %esp,%ebp
114b17: 57 push %edi
114b18: 56 push %esi
114b19: 53 push %ebx
114b1a: 83 ec 2c sub $0x2c,%esp
114b1d: 8b 55 08 mov 0x8(%ebp),%edx
114b20: 8b 45 0c mov 0xc(%ebp),%eax
114b23: 89 45 dc mov %eax,-0x24(%ebp)
114b26: 8b 4d 10 mov 0x10(%ebp),%ecx
114b29: 89 4d e0 mov %ecx,-0x20(%ebp)
114b2c: 8b 45 14 mov 0x14(%ebp),%eax
114b2f: 8b 5d 1c mov 0x1c(%ebp),%ebx
114b32: 89 5d d8 mov %ebx,-0x28(%ebp)
114b35: 0f b6 7d 18 movzbl 0x18(%ebp),%edi
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
114b39: 8b 0d d8 0c 13 00 mov 0x130cd8,%ecx
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
114b3f: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx)
_ISR_Disable( level );
114b46: 9c pushf
114b47: fa cli
114b48: 8f 45 e4 popl -0x1c(%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 );
}
114b4b: 8b 5a 50 mov 0x50(%edx),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
114b4e: 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))
114b51: 39 f3 cmp %esi,%ebx
114b53: 74 7b je 114bd0 <_CORE_message_queue_Seize+0xbc>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
114b55: 8b 0b mov (%ebx),%ecx
head->next = new_first;
114b57: 89 4a 50 mov %ecx,0x50(%edx)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
114b5a: 8d 72 50 lea 0x50(%edx),%esi
114b5d: 89 71 04 mov %esi,0x4(%ecx)
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
114b60: ff 4a 48 decl 0x48(%edx)
_ISR_Enable( level );
114b63: ff 75 e4 pushl -0x1c(%ebp)
114b66: 9d popf
*size_p = the_message->Contents.size;
114b67: 8b 4b 0c mov 0xc(%ebx),%ecx
114b6a: 89 08 mov %ecx,(%eax)
_Thread_Executing->Wait.count =
114b6c: 8b 73 08 mov 0x8(%ebx),%esi
114b6f: 8b 0d d8 0c 13 00 mov 0x130cd8,%ecx
114b75: 89 71 24 mov %esi,0x24(%ecx)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
114b78: 8d 4b 10 lea 0x10(%ebx),%ecx
114b7b: 89 4d e4 mov %ecx,-0x1c(%ebp)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
114b7e: 8b 08 mov (%eax),%ecx
114b80: 8b 7d e0 mov -0x20(%ebp),%edi
114b83: 8b 75 e4 mov -0x1c(%ebp),%esi
114b86: 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 );
114b88: 83 ec 0c sub $0xc,%esp
114b8b: 52 push %edx
114b8c: 89 55 d4 mov %edx,-0x2c(%ebp)
114b8f: e8 34 1e 00 00 call 1169c8 <_Thread_queue_Dequeue>
if ( !the_thread ) {
114b94: 83 c4 10 add $0x10,%esp
114b97: 85 c0 test %eax,%eax
114b99: 8b 55 d4 mov -0x2c(%ebp),%edx
114b9c: 0f 84 86 00 00 00 je 114c28 <_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;
114ba2: 8b 48 24 mov 0x24(%eax),%ecx
114ba5: 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;
114ba8: 8b 48 30 mov 0x30(%eax),%ecx
114bab: 89 4b 0c mov %ecx,0xc(%ebx)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
114bae: 8b 70 2c mov 0x2c(%eax),%esi
114bb1: 8b 7d e4 mov -0x1c(%ebp),%edi
114bb4: 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(
114bb6: 8b 43 08 mov 0x8(%ebx),%eax
114bb9: 89 45 10 mov %eax,0x10(%ebp)
114bbc: 89 5d 0c mov %ebx,0xc(%ebp)
114bbf: 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 );
}
114bc2: 8d 65 f4 lea -0xc(%ebp),%esp
114bc5: 5b pop %ebx
114bc6: 5e pop %esi
114bc7: 5f pop %edi
114bc8: c9 leave
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
114bc9: e9 c6 51 00 00 jmp 119d94 <_CORE_message_queue_Insert_message>
114bce: 66 90 xchg %ax,%ax
return;
}
#endif
}
if ( !wait ) {
114bd0: 89 fb mov %edi,%ebx
114bd2: 84 db test %bl,%bl
114bd4: 75 16 jne 114bec <_CORE_message_queue_Seize+0xd8>
_ISR_Enable( level );
114bd6: ff 75 e4 pushl -0x1c(%ebp)
114bd9: 9d popf
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
114bda: 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 );
}
114be1: 8d 65 f4 lea -0xc(%ebp),%esp
114be4: 5b pop %ebx
114be5: 5e pop %esi
114be6: 5f pop %edi
114be7: c9 leave
114be8: c3 ret
114be9: 8d 76 00 lea 0x0(%esi),%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;
114bec: 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;
114bf3: 89 51 44 mov %edx,0x44(%ecx)
executing->Wait.id = id;
114bf6: 8b 5d dc mov -0x24(%ebp),%ebx
114bf9: 89 59 20 mov %ebx,0x20(%ecx)
executing->Wait.return_argument_second.mutable_object = buffer;
114bfc: 8b 5d e0 mov -0x20(%ebp),%ebx
114bff: 89 59 2c mov %ebx,0x2c(%ecx)
executing->Wait.return_argument = size_p;
114c02: 89 41 28 mov %eax,0x28(%ecx)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
114c05: ff 75 e4 pushl -0x1c(%ebp)
114c08: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
114c09: c7 45 10 1c 6e 11 00 movl $0x116e1c,0x10(%ebp)
114c10: 8b 45 d8 mov -0x28(%ebp),%eax
114c13: 89 45 0c mov %eax,0xc(%ebp)
114c16: 89 55 08 mov %edx,0x8(%ebp)
}
114c19: 8d 65 f4 lea -0xc(%ebp),%esp
114c1c: 5b pop %ebx
114c1d: 5e pop %esi
114c1e: 5f pop %edi
114c1f: 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 );
114c20: e9 cb 1e 00 00 jmp 116af0 <_Thread_queue_Enqueue_with_handler>
114c25: 8d 76 00 lea 0x0(%esi),%esi
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 );
114c28: 89 5d 0c mov %ebx,0xc(%ebp)
114c2b: 83 c2 68 add $0x68,%edx
114c2e: 89 55 08 mov %edx,0x8(%ebp)
}
114c31: 8d 65 f4 lea -0xc(%ebp),%esp
114c34: 5b pop %ebx
114c35: 5e pop %esi
114c36: 5f pop %edi
114c37: c9 leave
114c38: e9 a7 fd ff ff jmp 1149e4 <_Chain_Append>
0010c080 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
10c080: 55 push %ebp
10c081: 89 e5 mov %esp,%ebp
10c083: 57 push %edi
10c084: 56 push %esi
10c085: 53 push %ebx
10c086: 83 ec 1c sub $0x1c,%esp
10c089: 8b 5d 08 mov 0x8(%ebp),%ebx
10c08c: 8b 75 0c mov 0xc(%ebp),%esi
10c08f: 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 ) {
10c092: 8b 45 10 mov 0x10(%ebp),%eax
10c095: 39 43 4c cmp %eax,0x4c(%ebx)
10c098: 72 32 jb 10c0cc <_CORE_message_queue_Submit+0x4c>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
10c09a: 8b 43 48 mov 0x48(%ebx),%eax
10c09d: 85 c0 test %eax,%eax
10c09f: 74 3b je 10c0dc <_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 <
10c0a1: 39 43 44 cmp %eax,0x44(%ebx)
10c0a4: 0f 87 ba 00 00 00 ja 10c164 <_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 ) {
10c0aa: 84 c9 test %cl,%cl
10c0ac: 0f 84 ee 00 00 00 je 10c1a0 <_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() ) {
10c0b2: 8b 15 f4 83 12 00 mov 0x1283f4,%edx
10c0b8: 85 d2 test %edx,%edx
10c0ba: 74 60 je 10c11c <_CORE_message_queue_Submit+0x9c>
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
10c0bc: 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
}
10c0c1: 8d 65 f4 lea -0xc(%ebp),%esp
10c0c4: 5b pop %ebx
10c0c5: 5e pop %esi
10c0c6: 5f pop %edi
10c0c7: c9 leave
10c0c8: c3 ret
10c0c9: 8d 76 00 lea 0x0(%esi),%esi
{
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;
10c0cc: 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
}
10c0d1: 8d 65 f4 lea -0xc(%ebp),%esp
10c0d4: 5b pop %ebx
10c0d5: 5e pop %esi
10c0d6: 5f pop %edi
10c0d7: c9 leave
10c0d8: c3 ret
10c0d9: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
10c0dc: 83 ec 0c sub $0xc,%esp
10c0df: 53 push %ebx
10c0e0: 88 4d e4 mov %cl,-0x1c(%ebp)
10c0e3: e8 a0 1c 00 00 call 10dd88 <_Thread_queue_Dequeue>
10c0e8: 89 c2 mov %eax,%edx
if ( the_thread ) {
10c0ea: 83 c4 10 add $0x10,%esp
10c0ed: 85 c0 test %eax,%eax
10c0ef: 8a 4d e4 mov -0x1c(%ebp),%cl
10c0f2: 0f 84 b8 00 00 00 je 10c1b0 <_CORE_message_queue_Submit+0x130>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10c0f8: 8b 40 2c mov 0x2c(%eax),%eax
10c0fb: 89 c7 mov %eax,%edi
10c0fd: 8b 4d 10 mov 0x10(%ebp),%ecx
10c100: 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;
10c102: 8b 42 28 mov 0x28(%edx),%eax
10c105: 8b 4d 10 mov 0x10(%ebp),%ecx
10c108: 89 08 mov %ecx,(%eax)
the_thread->Wait.count = (uint32_t) submit_type;
10c10a: 8b 45 1c mov 0x1c(%ebp),%eax
10c10d: 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;
10c110: 31 c0 xor %eax,%eax
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
10c112: 8d 65 f4 lea -0xc(%ebp),%esp
10c115: 5b pop %ebx
10c116: 5e pop %esi
10c117: 5f pop %edi
10c118: c9 leave
10c119: c3 ret
10c11a: 66 90 xchg %ax,%ax
* 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;
10c11c: a1 f8 83 12 00 mov 0x1283f8,%eax
ISR_Level level;
_ISR_Disable( level );
10c121: 9c pushf
10c122: fa cli
10c123: 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;
10c124: 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;
10c12b: 89 58 44 mov %ebx,0x44(%eax)
executing->Wait.id = id;
10c12e: 8b 55 14 mov 0x14(%ebp),%edx
10c131: 89 50 20 mov %edx,0x20(%eax)
executing->Wait.return_argument_second.immutable_object = buffer;
10c134: 89 70 2c mov %esi,0x2c(%eax)
executing->Wait.option = (uint32_t) size;
10c137: 8b 55 10 mov 0x10(%ebp),%edx
10c13a: 89 50 30 mov %edx,0x30(%eax)
executing->Wait.count = submit_type;
10c13d: 8b 55 1c mov 0x1c(%ebp),%edx
10c140: 89 50 24 mov %edx,0x24(%eax)
_ISR_Enable( level );
10c143: 51 push %ecx
10c144: 9d popf
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
10c145: 50 push %eax
10c146: 68 dc e1 10 00 push $0x10e1dc
10c14b: ff 75 24 pushl 0x24(%ebp)
10c14e: 53 push %ebx
10c14f: e8 5c 1d 00 00 call 10deb0 <_Thread_queue_Enqueue_with_handler>
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
10c154: 83 c4 10 add $0x10,%esp
10c157: b8 07 00 00 00 mov $0x7,%eax
#endif
}
10c15c: 8d 65 f4 lea -0xc(%ebp),%esp
10c15f: 5b pop %ebx
10c160: 5e pop %esi
10c161: 5f pop %edi
10c162: c9 leave
10c163: 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 );
10c164: 83 ec 0c sub $0xc,%esp
10c167: 8d 43 68 lea 0x68(%ebx),%eax
10c16a: 50 push %eax
10c16b: e8 ec fe ff ff call 10c05c <_Chain_Get>
10c170: 89 c2 mov %eax,%edx
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
#endif
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
10c172: 8d 40 10 lea 0x10(%eax),%eax
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
10c175: 89 c7 mov %eax,%edi
10c177: 8b 4d 10 mov 0x10(%ebp),%ecx
10c17a: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
size
);
the_message->Contents.size = size;
10c17c: 8b 4d 10 mov 0x10(%ebp),%ecx
10c17f: 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;
10c182: 8b 45 1c mov 0x1c(%ebp),%eax
10c185: 89 42 08 mov %eax,0x8(%edx)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
10c188: 83 c4 0c add $0xc,%esp
10c18b: 50 push %eax
10c18c: 52 push %edx
10c18d: 53 push %ebx
10c18e: e8 ad 4f 00 00 call 111140 <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
10c193: 83 c4 10 add $0x10,%esp
10c196: 31 c0 xor %eax,%eax
10c198: e9 34 ff ff ff jmp 10c0d1 <_CORE_message_queue_Submit+0x51>
10c19d: 8d 76 00 lea 0x0(%esi),%esi
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY;
10c1a0: 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
}
10c1a5: 8d 65 f4 lea -0xc(%ebp),%esp
10c1a8: 5b pop %ebx
10c1a9: 5e pop %esi
10c1aa: 5f pop %edi
10c1ab: c9 leave
10c1ac: c3 ret
10c1ad: 8d 76 00 lea 0x0(%esi),%esi
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
if ( the_thread ) {
10c1b0: 8b 43 48 mov 0x48(%ebx),%eax
10c1b3: e9 e9 fe ff ff jmp 10c0a1 <_CORE_message_queue_Submit+0x21>
0010c1c4 <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
10c1c4: 55 push %ebp
10c1c5: 89 e5 mov %esp,%ebp
10c1c7: 57 push %edi
10c1c8: 56 push %esi
10c1c9: 53 push %ebx
10c1ca: 83 ec 0c sub $0xc,%esp
10c1cd: 8b 45 08 mov 0x8(%ebp),%eax
10c1d0: 8b 5d 0c mov 0xc(%ebp),%ebx
10c1d3: 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;
10c1d6: 8d 78 40 lea 0x40(%eax),%edi
10c1d9: b9 04 00 00 00 mov $0x4,%ecx
10c1de: 89 de mov %ebx,%esi
10c1e0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_mutex->lock = initial_lock;
10c1e2: 89 50 50 mov %edx,0x50(%eax)
the_mutex->blocked_count = 0;
10c1e5: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax)
if ( initial_lock == CORE_MUTEX_LOCKED ) {
10c1ec: 85 d2 test %edx,%edx
10c1ee: 75 30 jne 10c220 <_CORE_mutex_Initialize+0x5c>
the_mutex->nest_count = 1;
10c1f0: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
the_mutex->holder = _Thread_Executing;
10c1f7: 8b 15 f8 83 12 00 mov 0x1283f8,%edx
10c1fd: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = _Thread_Executing->Object.id;
10c200: 8b 4a 08 mov 0x8(%edx),%ecx
10c203: 89 48 60 mov %ecx,0x60(%eax)
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c206: 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 ) ||
10c209: 83 f9 02 cmp $0x2,%ecx
10c20c: 74 05 je 10c213 <_CORE_mutex_Initialize+0x4f>
10c20e: 83 f9 03 cmp $0x3,%ecx
10c211: 75 22 jne 10c235 <_CORE_mutex_Initialize+0x71>
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
10c213: 8b 48 4c mov 0x4c(%eax),%ecx
10c216: 39 4a 14 cmp %ecx,0x14(%edx)
10c219: 72 41 jb 10c25c <_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++;
10c21b: ff 42 1c incl 0x1c(%edx)
10c21e: eb 15 jmp 10c235 <_CORE_mutex_Initialize+0x71>
}
} else {
the_mutex->nest_count = 0;
10c220: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
the_mutex->holder = NULL;
10c227: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
the_mutex->holder_id = 0;
10c22e: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
}
_Thread_queue_Initialize(
10c235: 6a 05 push $0x5
10c237: 68 00 04 00 00 push $0x400
10c23c: 31 d2 xor %edx,%edx
10c23e: 83 7b 08 00 cmpl $0x0,0x8(%ebx)
10c242: 0f 95 c2 setne %dl
10c245: 52 push %edx
10c246: 50 push %eax
10c247: e8 cc 1e 00 00 call 10e118 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c24c: 83 c4 10 add $0x10,%esp
10c24f: 31 c0 xor %eax,%eax
}
10c251: 8d 65 f4 lea -0xc(%ebp),%esp
10c254: 5b pop %ebx
10c255: 5e pop %esi
10c256: 5f pop %edi
10c257: c9 leave
10c258: c3 ret
10c259: 8d 76 00 lea 0x0(%esi),%esi
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;
10c25c: b8 06 00 00 00 mov $0x6,%eax
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c261: 8d 65 f4 lea -0xc(%ebp),%esp
10c264: 5b pop %ebx
10c265: 5e pop %esi
10c266: 5f pop %edi
10c267: c9 leave
10c268: c3 ret
0010c2bc <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
10c2bc: 55 push %ebp
10c2bd: 89 e5 mov %esp,%ebp
10c2bf: 53 push %ebx
10c2c0: 83 ec 14 sub $0x14,%esp
10c2c3: 8b 5d 08 mov 0x8(%ebp),%ebx
10c2c6: 8a 55 10 mov 0x10(%ebp),%dl
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c2c9: a1 50 7e 12 00 mov 0x127e50,%eax
10c2ce: 85 c0 test %eax,%eax
10c2d0: 74 04 je 10c2d6 <_CORE_mutex_Seize+0x1a>
10c2d2: 84 d2 test %dl,%dl
10c2d4: 75 36 jne 10c30c <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN
10c2d6: 83 ec 08 sub $0x8,%esp
10c2d9: 8d 45 18 lea 0x18(%ebp),%eax
10c2dc: 50 push %eax
10c2dd: 53 push %ebx
10c2de: 88 55 f4 mov %dl,-0xc(%ebp)
10c2e1: e8 32 4f 00 00 call 111218 <_CORE_mutex_Seize_interrupt_trylock>
10c2e6: 83 c4 10 add $0x10,%esp
10c2e9: 85 c0 test %eax,%eax
10c2eb: 8a 55 f4 mov -0xc(%ebp),%dl
10c2ee: 74 14 je 10c304 <_CORE_mutex_Seize+0x48>
10c2f0: 84 d2 test %dl,%dl
10c2f2: 75 30 jne 10c324 <_CORE_mutex_Seize+0x68>
10c2f4: ff 75 18 pushl 0x18(%ebp)
10c2f7: 9d popf
10c2f8: a1 f8 83 12 00 mov 0x1283f8,%eax
10c2fd: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax)
}
10c304: 8b 5d fc mov -0x4(%ebp),%ebx
10c307: c9 leave
10c308: c3 ret
10c309: 8d 76 00 lea 0x0(%esi),%esi
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
10c30c: 83 3d e0 7f 12 00 01 cmpl $0x1,0x127fe0
10c313: 76 c1 jbe 10c2d6 <_CORE_mutex_Seize+0x1a>
10c315: 53 push %ebx
10c316: 6a 12 push $0x12
10c318: 6a 00 push $0x0
10c31a: 6a 00 push $0x0
10c31c: e8 1b 06 00 00 call 10c93c <_Internal_error_Occurred>
10c321: 8d 76 00 lea 0x0(%esi),%esi
10c324: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx)
10c32b: a1 f8 83 12 00 mov 0x1283f8,%eax
10c330: 89 58 44 mov %ebx,0x44(%eax)
10c333: 8b 55 0c mov 0xc(%ebp),%edx
10c336: 89 50 20 mov %edx,0x20(%eax)
10c339: a1 50 7e 12 00 mov 0x127e50,%eax
10c33e: 40 inc %eax
10c33f: a3 50 7e 12 00 mov %eax,0x127e50
10c344: ff 75 18 pushl 0x18(%ebp)
10c347: 9d popf
10c348: 83 ec 08 sub $0x8,%esp
10c34b: ff 75 14 pushl 0x14(%ebp)
10c34e: 53 push %ebx
10c34f: e8 18 ff ff ff call 10c26c <_CORE_mutex_Seize_interrupt_blocking>
10c354: 83 c4 10 add $0x10,%esp
}
10c357: 8b 5d fc mov -0x4(%ebp),%ebx
10c35a: c9 leave
10c35b: c3 ret
00111218 <_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
)
{
111218: 55 push %ebp
111219: 89 e5 mov %esp,%ebp
11121b: 56 push %esi
11121c: 53 push %ebx
11121d: 8b 45 08 mov 0x8(%ebp),%eax
111220: 8b 4d 0c mov 0xc(%ebp),%ecx
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
111223: 8b 15 f8 83 12 00 mov 0x1283f8,%edx
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
111229: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
111230: 8b 58 50 mov 0x50(%eax),%ebx
111233: 85 db test %ebx,%ebx
111235: 74 31 je 111268 <_CORE_mutex_Seize_interrupt_trylock+0x50>
the_mutex->lock = CORE_MUTEX_LOCKED;
111237: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax)
the_mutex->holder = executing;
11123e: 89 50 5c mov %edx,0x5c(%eax)
the_mutex->holder_id = executing->Object.id;
111241: 8b 5a 08 mov 0x8(%edx),%ebx
111244: 89 58 60 mov %ebx,0x60(%eax)
the_mutex->nest_count = 1;
111247: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax)
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
11124e: 8b 58 48 mov 0x48(%eax),%ebx
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
111251: 83 fb 02 cmp $0x2,%ebx
111254: 74 26 je 11127c <_CORE_mutex_Seize_interrupt_trylock+0x64>
111256: 83 fb 03 cmp $0x3,%ebx
111259: 74 3d je 111298 <_CORE_mutex_Seize_interrupt_trylock+0x80>
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
11125b: ff 31 pushl (%ecx)
11125d: 9d popf
return 0;
11125e: 31 c0 xor %eax,%eax
111260: 8d 65 f8 lea -0x8(%ebp),%esp
111263: 5b pop %ebx
111264: 5e pop %esi
111265: c9 leave
111266: c3 ret
111267: 90 nop
/*
* 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 ) ) {
111268: 3b 50 5c cmp 0x5c(%eax),%edx
11126b: 74 17 je 111284 <_CORE_mutex_Seize_interrupt_trylock+0x6c>
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
11126d: b8 01 00 00 00 mov $0x1,%eax
111272: 8d 65 f8 lea -0x8(%ebp),%esp
111275: 5b pop %ebx
111276: 5e pop %esi
111277: c9 leave
111278: c3 ret
111279: 8d 76 00 lea 0x0(%esi),%esi
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
11127c: ff 42 1c incl 0x1c(%edx)
11127f: eb da jmp 11125b <_CORE_mutex_Seize_interrupt_trylock+0x43>
111281: 8d 76 00 lea 0x0(%esi),%esi
* 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 ) {
111284: 8b 58 40 mov 0x40(%eax),%ebx
111287: 85 db test %ebx,%ebx
111289: 75 45 jne 1112d0 <_CORE_mutex_Seize_interrupt_trylock+0xb8>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
11128b: ff 40 54 incl 0x54(%eax)
_ISR_Enable( *level_p );
11128e: ff 31 pushl (%ecx)
111290: 9d popf
return 0;
111291: 31 c0 xor %eax,%eax
111293: eb dd jmp 111272 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
111295: 8d 76 00 lea 0x0(%esi),%esi
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
111298: 8b 5a 1c mov 0x1c(%edx),%ebx
11129b: 8d 73 01 lea 0x1(%ebx),%esi
11129e: 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 ) {
1112a1: 8b 72 14 mov 0x14(%edx),%esi
1112a4: 39 70 4c cmp %esi,0x4c(%eax)
1112a7: 74 6b je 111314 <_CORE_mutex_Seize_interrupt_trylock+0xfc>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
1112a9: 72 39 jb 1112e4 <_CORE_mutex_Seize_interrupt_trylock+0xcc>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
1112ab: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
1112b2: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax)
the_mutex->nest_count = 0; /* undo locking above */
1112b9: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
executing->resource_count--; /* undo locking above */
1112c0: 89 5a 1c mov %ebx,0x1c(%edx)
_ISR_Enable( *level_p );
1112c3: ff 31 pushl (%ecx)
1112c5: 9d popf
return 0;
1112c6: 31 c0 xor %eax,%eax
1112c8: 8d 65 f8 lea -0x8(%ebp),%esp
1112cb: 5b pop %ebx
1112cc: 5e pop %esi
1112cd: c9 leave
1112ce: c3 ret
1112cf: 90 nop
* 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 ) {
1112d0: 4b dec %ebx
1112d1: 75 9a jne 11126d <_CORE_mutex_Seize_interrupt_trylock+0x55>
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
#if defined(RTEMS_POSIX_API)
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
1112d3: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx)
_ISR_Enable( *level_p );
1112da: ff 31 pushl (%ecx)
1112dc: 9d popf
return 0;
1112dd: 31 c0 xor %eax,%eax
1112df: eb 91 jmp 111272 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
1112e1: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
1112e4: 8b 15 50 7e 12 00 mov 0x127e50,%edx
1112ea: 42 inc %edx
1112eb: 89 15 50 7e 12 00 mov %edx,0x127e50
return 0;
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
1112f1: ff 31 pushl (%ecx)
1112f3: 9d popf
_Thread_Change_priority(
1112f4: 52 push %edx
1112f5: 6a 00 push $0x0
1112f7: ff 70 4c pushl 0x4c(%eax)
1112fa: ff 70 5c pushl 0x5c(%eax)
1112fd: e8 ce c2 ff ff call 10d5d0 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
111302: e8 01 c7 ff ff call 10da08 <_Thread_Enable_dispatch>
111307: 83 c4 10 add $0x10,%esp
return 0;
11130a: 31 c0 xor %eax,%eax
11130c: e9 61 ff ff ff jmp 111272 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
111311: 8d 76 00 lea 0x0(%esi),%esi
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
111314: ff 31 pushl (%ecx)
111316: 9d popf
return 0;
111317: 31 c0 xor %eax,%eax
111319: e9 54 ff ff ff jmp 111272 <_CORE_mutex_Seize_interrupt_trylock+0x5a>
0010c35c <_CORE_mutex_Surrender>:
#else
Objects_Id id __attribute__((unused)),
CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused))
#endif
)
{
10c35c: 55 push %ebp
10c35d: 89 e5 mov %esp,%ebp
10c35f: 53 push %ebx
10c360: 83 ec 04 sub $0x4,%esp
10c363: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *the_thread;
Thread_Control *holder;
holder = the_mutex->holder;
10c366: 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 ) {
10c369: 80 7b 44 00 cmpb $0x0,0x44(%ebx)
10c36d: 74 15 je 10c384 <_CORE_mutex_Surrender+0x28>
if ( !_Thread_Is_executing( holder ) )
10c36f: 3b 05 f8 83 12 00 cmp 0x1283f8,%eax
10c375: 74 0d je 10c384 <_CORE_mutex_Surrender+0x28>
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
10c377: b8 03 00 00 00 mov $0x3,%eax
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c37c: 8b 5d fc mov -0x4(%ebp),%ebx
10c37f: c9 leave
10c380: c3 ret
10c381: 8d 76 00 lea 0x0(%esi),%esi
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
10c384: 8b 53 54 mov 0x54(%ebx),%edx
10c387: 85 d2 test %edx,%edx
10c389: 74 51 je 10c3dc <_CORE_mutex_Surrender+0x80>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
10c38b: 4a dec %edx
10c38c: 89 53 54 mov %edx,0x54(%ebx)
if ( the_mutex->nest_count != 0 ) {
10c38f: 85 d2 test %edx,%edx
10c391: 75 49 jne 10c3dc <_CORE_mutex_Surrender+0x80>
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
10c393: 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 ) ||
10c396: 83 fa 02 cmp $0x2,%edx
10c399: 74 69 je 10c404 <_CORE_mutex_Surrender+0xa8>
10c39b: 83 fa 03 cmp $0x3,%edx
10c39e: 74 64 je 10c404 <_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;
10c3a0: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
the_mutex->holder_id = 0;
10c3a7: 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 ) ) ) {
10c3ae: 83 ec 0c sub $0xc,%esp
10c3b1: 53 push %ebx
10c3b2: e8 d1 19 00 00 call 10dd88 <_Thread_queue_Dequeue>
10c3b7: 83 c4 10 add $0x10,%esp
10c3ba: 85 c0 test %eax,%eax
10c3bc: 74 7a je 10c438 <_CORE_mutex_Surrender+0xdc>
} else
#endif
{
the_mutex->holder = the_thread;
10c3be: 89 43 5c mov %eax,0x5c(%ebx)
the_mutex->holder_id = the_thread->Object.id;
10c3c1: 8b 50 08 mov 0x8(%eax),%edx
10c3c4: 89 53 60 mov %edx,0x60(%ebx)
the_mutex->nest_count = 1;
10c3c7: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx)
switch ( the_mutex->Attributes.discipline ) {
10c3ce: 8b 53 48 mov 0x48(%ebx),%edx
10c3d1: 83 fa 02 cmp $0x2,%edx
10c3d4: 74 56 je 10c42c <_CORE_mutex_Surrender+0xd0>
10c3d6: 83 fa 03 cmp $0x3,%edx
10c3d9: 74 09 je 10c3e4 <_CORE_mutex_Surrender+0x88>
10c3db: 90 nop
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c3dc: 31 c0 xor %eax,%eax
}
10c3de: 8b 5d fc mov -0x4(%ebp),%ebx
10c3e1: c9 leave
10c3e2: c3 ret
10c3e3: 90 nop
_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++;
10c3e4: ff 40 1c incl 0x1c(%eax)
if (the_mutex->Attributes.priority_ceiling <
10c3e7: 8b 53 4c mov 0x4c(%ebx),%edx
10c3ea: 3b 50 14 cmp 0x14(%eax),%edx
10c3ed: 73 ed jae 10c3dc <_CORE_mutex_Surrender+0x80>
the_thread->current_priority){
_Thread_Change_priority(
10c3ef: 51 push %ecx
10c3f0: 6a 00 push $0x0
10c3f2: 52 push %edx
10c3f3: 50 push %eax
10c3f4: e8 d7 11 00 00 call 10d5d0 <_Thread_Change_priority>
10c3f9: 83 c4 10 add $0x10,%esp
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c3fc: 31 c0 xor %eax,%eax
10c3fe: e9 79 ff ff ff jmp 10c37c <_CORE_mutex_Surrender+0x20>
10c403: 90 nop
_CORE_mutex_Pop_priority( the_mutex, holder );
if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL )
return pop_status;
holder->resource_count--;
10c404: 8b 50 1c mov 0x1c(%eax),%edx
10c407: 4a dec %edx
10c408: 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 &&
10c40b: 85 d2 test %edx,%edx
10c40d: 75 91 jne 10c3a0 <_CORE_mutex_Surrender+0x44>
holder->real_priority != holder->current_priority ) {
10c40f: 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 &&
10c412: 3b 50 14 cmp 0x14(%eax),%edx
10c415: 74 89 je 10c3a0 <_CORE_mutex_Surrender+0x44>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
10c417: 51 push %ecx
10c418: 6a 01 push $0x1
10c41a: 52 push %edx
10c41b: 50 push %eax
10c41c: e8 af 11 00 00 call 10d5d0 <_Thread_Change_priority>
10c421: 83 c4 10 add $0x10,%esp
10c424: e9 77 ff ff ff jmp 10c3a0 <_CORE_mutex_Surrender+0x44>
10c429: 8d 76 00 lea 0x0(%esi),%esi
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++;
10c42c: ff 40 1c incl 0x1c(%eax)
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c42f: 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;
10c431: e9 46 ff ff ff jmp 10c37c <_CORE_mutex_Surrender+0x20>
10c436: 66 90 xchg %ax,%ax
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
10c438: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx)
return CORE_MUTEX_STATUS_SUCCESSFUL;
10c43f: 31 c0 xor %eax,%eax
10c441: e9 36 ff ff ff jmp 10c37c <_CORE_mutex_Surrender+0x20>
00115318 <_CORE_semaphore_Seize>:
CORE_semaphore_Control *the_semaphore,
Objects_Id id,
bool wait,
Watchdog_Interval timeout
)
{
115318: 55 push %ebp
115319: 89 e5 mov %esp,%ebp
11531b: 57 push %edi
11531c: 56 push %esi
11531d: 53 push %ebx
11531e: 83 ec 1c sub $0x1c,%esp
115321: 8b 45 08 mov 0x8(%ebp),%eax
115324: 8b 7d 0c mov 0xc(%ebp),%edi
115327: 8b 75 14 mov 0x14(%ebp),%esi
11532a: 8a 5d 10 mov 0x10(%ebp),%bl
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
11532d: 8b 15 78 e1 12 00 mov 0x12e178,%edx
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
115333: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
_ISR_Disable( level );
11533a: 9c pushf
11533b: fa cli
11533c: 8f 45 e4 popl -0x1c(%ebp)
if ( the_semaphore->count != 0 ) {
11533f: 8b 48 48 mov 0x48(%eax),%ecx
115342: 85 c9 test %ecx,%ecx
115344: 75 46 jne 11538c <_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 ) {
115346: 84 db test %bl,%bl
115348: 75 16 jne 115360 <_CORE_semaphore_Seize+0x48>
_ISR_Enable( level );
11534a: ff 75 e4 pushl -0x1c(%ebp)
11534d: 9d popf
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
11534e: 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 );
}
115355: 83 c4 1c add $0x1c,%esp
115358: 5b pop %ebx
115359: 5e pop %esi
11535a: 5f pop %edi
11535b: c9 leave
11535c: c3 ret
11535d: 8d 76 00 lea 0x0(%esi),%esi
115360: 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;
115367: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
11536a: 89 7a 20 mov %edi,0x20(%edx)
_ISR_Enable( level );
11536d: ff 75 e4 pushl -0x1c(%ebp)
115370: 9d popf
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
115371: c7 45 10 00 1c 11 00 movl $0x111c00,0x10(%ebp)
115378: 89 75 0c mov %esi,0xc(%ebp)
11537b: 89 45 08 mov %eax,0x8(%ebp)
}
11537e: 83 c4 1c add $0x1c,%esp
115381: 5b pop %ebx
115382: 5e pop %esi
115383: 5f pop %edi
115384: 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 );
115385: e9 4a c5 ff ff jmp 1118d4 <_Thread_queue_Enqueue_with_handler>
11538a: 66 90 xchg %ax,%ax
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
11538c: 49 dec %ecx
11538d: 89 48 48 mov %ecx,0x48(%eax)
_ISR_Enable( level );
115390: ff 75 e4 pushl -0x1c(%ebp)
115393: 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 );
}
115394: 83 c4 1c add $0x1c,%esp
115397: 5b pop %ebx
115398: 5e pop %esi
115399: 5f pop %edi
11539a: c9 leave
11539b: c3 ret
0010c494 <_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
)
{
10c494: 55 push %ebp
10c495: 89 e5 mov %esp,%ebp
10c497: 53 push %ebx
10c498: 83 ec 10 sub $0x10,%esp
10c49b: 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)) ) {
10c49e: 53 push %ebx
10c49f: e8 e4 18 00 00 call 10dd88 <_Thread_queue_Dequeue>
10c4a4: 83 c4 10 add $0x10,%esp
10c4a7: 85 c0 test %eax,%eax
10c4a9: 74 09 je 10c4b4 <_CORE_semaphore_Surrender+0x20>
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c4ab: 31 c0 xor %eax,%eax
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
10c4ad: 8b 5d fc mov -0x4(%ebp),%ebx
10c4b0: c9 leave
10c4b1: c3 ret
10c4b2: 66 90 xchg %ax,%ax
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
10c4b4: 9c pushf
10c4b5: fa cli
10c4b6: 5a pop %edx
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
10c4b7: 8b 43 48 mov 0x48(%ebx),%eax
10c4ba: 3b 43 40 cmp 0x40(%ebx),%eax
10c4bd: 72 0d jb 10c4cc <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
10c4bf: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED
_ISR_Enable( level );
10c4c4: 52 push %edx
10c4c5: 9d popf
}
return status;
}
10c4c6: 8b 5d fc mov -0x4(%ebp),%ebx
10c4c9: c9 leave
10c4ca: c3 ret
10c4cb: 90 nop
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
10c4cc: 40 inc %eax
10c4cd: 89 43 48 mov %eax,0x48(%ebx)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10c4d0: 31 c0 xor %eax,%eax
10c4d2: eb f0 jmp 10c4c4 <_CORE_semaphore_Surrender+0x30>
0010c7d4 <_Chain_Get_with_empty_check>:
bool _Chain_Get_with_empty_check(
Chain_Control *chain,
Chain_Node **node
)
{
10c7d4: 55 push %ebp
10c7d5: 89 e5 mov %esp,%ebp
10c7d7: 57 push %edi
10c7d8: 56 push %esi
10c7d9: 53 push %ebx
10c7da: 8b 45 08 mov 0x8(%ebp),%eax
10c7dd: 8b 7d 0c mov 0xc(%ebp),%edi
ISR_Level level;
bool is_empty_now;
_ISR_Disable( level );
10c7e0: 9c pushf
10c7e1: fa cli
10c7e2: 5e pop %esi
Chain_Node **the_node
)
{
bool is_empty_now = true;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c7e3: 8d 58 04 lea 0x4(%eax),%ebx
Chain_Node *old_first = head->next;
10c7e6: 8b 10 mov (%eax),%edx
if ( old_first != tail ) {
10c7e8: 39 d3 cmp %edx,%ebx
10c7ea: 74 18 je 10c804 <_Chain_Get_with_empty_check+0x30>
Chain_Node *new_first = old_first->next;
10c7ec: 8b 0a mov (%edx),%ecx
head->next = new_first;
10c7ee: 89 08 mov %ecx,(%eax)
new_first->previous = head;
10c7f0: 89 41 04 mov %eax,0x4(%ecx)
*the_node = old_first;
10c7f3: 89 17 mov %edx,(%edi)
is_empty_now = new_first == tail;
10c7f5: 39 cb cmp %ecx,%ebx
10c7f7: 0f 94 c0 sete %al
is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node );
_ISR_Enable( level );
10c7fa: 56 push %esi
10c7fb: 9d popf
return is_empty_now;
}
10c7fc: 5b pop %ebx
10c7fd: 5e pop %esi
10c7fe: 5f pop %edi
10c7ff: c9 leave
10c800: c3 ret
10c801: 8d 76 00 lea 0x0(%esi),%esi
} else
*the_node = NULL;
10c804: c7 07 00 00 00 00 movl $0x0,(%edi)
RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected(
Chain_Control *the_chain,
Chain_Node **the_node
)
{
bool is_empty_now = true;
10c80a: b0 01 mov $0x1,%al
10c80c: eb ec jmp 10c7fa <_Chain_Get_with_empty_check+0x26>
001110e4 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
1110e4: 55 push %ebp
1110e5: 89 e5 mov %esp,%ebp
1110e7: 57 push %edi
1110e8: 56 push %esi
1110e9: 53 push %ebx
1110ea: 83 ec 08 sub $0x8,%esp
1110ed: 8b 7d 08 mov 0x8(%ebp),%edi
1110f0: 8b 4d 10 mov 0x10(%ebp),%ecx
1110f3: 8b 75 14 mov 0x14(%ebp),%esi
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
1110f6: 8d 47 04 lea 0x4(%edi),%eax
1110f9: 89 45 f0 mov %eax,-0x10(%ebp)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
1110fc: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
while ( count-- ) {
111103: 85 c9 test %ecx,%ecx
111105: 74 35 je 11113c <_Chain_Initialize+0x58><== NEVER TAKEN
111107: 49 dec %ecx
111108: 89 4d ec mov %ecx,-0x14(%ebp)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
11110b: 8b 45 0c mov 0xc(%ebp),%eax
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
11110e: 89 fa mov %edi,%edx
111110: eb 07 jmp 111119 <_Chain_Initialize+0x35>
111112: 66 90 xchg %ax,%ax
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
111114: 89 c2 mov %eax,%edx
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
111116: 89 d8 mov %ebx,%eax
111118: 49 dec %ecx
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
111119: 89 02 mov %eax,(%edx)
next->previous = current;
11111b: 89 50 04 mov %edx,0x4(%eax)
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
11111e: 8d 1c 30 lea (%eax,%esi,1),%ebx
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
111121: 85 c9 test %ecx,%ecx
111123: 75 ef jne 111114 <_Chain_Initialize+0x30>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
111125: 0f af 75 ec imul -0x14(%ebp),%esi
111129: 03 75 0c add 0xc(%ebp),%esi
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
11112c: 8b 45 f0 mov -0x10(%ebp),%eax
11112f: 89 06 mov %eax,(%esi)
tail->previous = current;
111131: 89 77 08 mov %esi,0x8(%edi)
}
111134: 83 c4 08 add $0x8,%esp
111137: 5b pop %ebx
111138: 5e pop %esi
111139: 5f pop %edi
11113a: c9 leave
11113b: c3 ret
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
11113c: 89 fe mov %edi,%esi <== NOT EXECUTED
11113e: eb ec jmp 11112c <_Chain_Initialize+0x48><== NOT EXECUTED
0010b0b8 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
10b0b8: 55 push %ebp
10b0b9: 89 e5 mov %esp,%ebp
10b0bb: 57 push %edi
10b0bc: 56 push %esi
10b0bd: 53 push %ebx
10b0be: 83 ec 2c sub $0x2c,%esp
10b0c1: 8b 45 08 mov 0x8(%ebp),%eax
10b0c4: 8b 4d 0c mov 0xc(%ebp),%ecx
10b0c7: 8b 55 10 mov 0x10(%ebp),%edx
10b0ca: 89 55 dc mov %edx,-0x24(%ebp)
10b0cd: 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;
10b0d0: 8b 1d f8 83 12 00 mov 0x1283f8,%ebx
executing->Wait.return_code = RTEMS_SUCCESSFUL;
10b0d6: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
10b0dd: 8b b3 e8 00 00 00 mov 0xe8(%ebx),%esi
_ISR_Disable( level );
10b0e3: 9c pushf
10b0e4: fa cli
10b0e5: 8f 45 e0 popl -0x20(%ebp)
pending_events = api->pending_events;
10b0e8: 8b 16 mov (%esi),%edx
10b0ea: 89 55 d4 mov %edx,-0x2c(%ebp)
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
10b0ed: 21 c2 and %eax,%edx
10b0ef: 89 55 e4 mov %edx,-0x1c(%ebp)
10b0f2: 74 0d je 10b101 <_Event_Seize+0x49>
10b0f4: 39 d0 cmp %edx,%eax
10b0f6: 0f 84 84 00 00 00 je 10b180 <_Event_Seize+0xc8>
(seized_events == event_in || _Options_Is_any( option_set )) ) {
10b0fc: f6 c1 02 test $0x2,%cl
10b0ff: 75 7f jne 10b180 <_Event_Seize+0xc8>
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
10b101: f6 c1 01 test $0x1,%cl
10b104: 75 62 jne 10b168 <_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;
10b106: 89 4b 30 mov %ecx,0x30(%ebx)
executing->Wait.count = (uint32_t) event_in;
10b109: 89 43 24 mov %eax,0x24(%ebx)
executing->Wait.return_argument = event_out;
10b10c: 89 7b 28 mov %edi,0x28(%ebx)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10b10f: c7 05 28 88 12 00 01 movl $0x1,0x128828
10b116: 00 00 00
_ISR_Enable( level );
10b119: ff 75 e0 pushl -0x20(%ebp)
10b11c: 9d popf
if ( ticks ) {
10b11d: 8b 45 dc mov -0x24(%ebp),%eax
10b120: 85 c0 test %eax,%eax
10b122: 0f 85 80 00 00 00 jne 10b1a8 <_Event_Seize+0xf0>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
10b128: 83 ec 08 sub $0x8,%esp
10b12b: 68 00 01 00 00 push $0x100
10b130: 53 push %ebx
10b131: e8 f6 30 00 00 call 10e22c <_Thread_Set_state>
_ISR_Disable( level );
10b136: 9c pushf
10b137: fa cli
10b138: 5a pop %edx
sync_state = _Event_Sync_state;
10b139: a1 28 88 12 00 mov 0x128828,%eax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10b13e: c7 05 28 88 12 00 00 movl $0x0,0x128828
10b145: 00 00 00
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
10b148: 83 c4 10 add $0x10,%esp
10b14b: 83 f8 01 cmp $0x1,%eax
10b14e: 74 4c je 10b19c <_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 );
10b150: 89 55 10 mov %edx,0x10(%ebp)
10b153: 89 5d 0c mov %ebx,0xc(%ebp)
10b156: 89 45 08 mov %eax,0x8(%ebp)
}
10b159: 8d 65 f4 lea -0xc(%ebp),%esp
10b15c: 5b pop %ebx
10b15d: 5e pop %esi
10b15e: 5f pop %edi
10b15f: 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 );
10b160: e9 1f 24 00 00 jmp 10d584 <_Thread_blocking_operation_Cancel>
10b165: 8d 76 00 lea 0x0(%esi),%esi
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
10b168: ff 75 e0 pushl -0x20(%ebp)
10b16b: 9d popf
executing->Wait.return_code = RTEMS_UNSATISFIED;
10b16c: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx)
*event_out = seized_events;
10b173: 8b 55 e4 mov -0x1c(%ebp),%edx
10b176: 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 );
}
10b178: 8d 65 f4 lea -0xc(%ebp),%esp
10b17b: 5b pop %ebx
10b17c: 5e pop %esi
10b17d: 5f pop %edi
10b17e: c9 leave
10b17f: 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) );
10b180: 8b 45 e4 mov -0x1c(%ebp),%eax
10b183: f7 d0 not %eax
10b185: 23 45 d4 and -0x2c(%ebp),%eax
10b188: 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 );
10b18a: ff 75 e0 pushl -0x20(%ebp)
10b18d: 9d popf
*event_out = seized_events;
10b18e: 8b 45 e4 mov -0x1c(%ebp),%eax
10b191: 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 );
}
10b193: 8d 65 f4 lea -0xc(%ebp),%esp
10b196: 5b pop %ebx
10b197: 5e pop %esi
10b198: 5f pop %edi
10b199: c9 leave
10b19a: c3 ret
10b19b: 90 nop
_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 );
10b19c: 52 push %edx
10b19d: 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 );
}
10b19e: 8d 65 f4 lea -0xc(%ebp),%esp
10b1a1: 5b pop %ebx
10b1a2: 5e pop %esi
10b1a3: 5f pop %edi
10b1a4: c9 leave
10b1a5: c3 ret
10b1a6: 66 90 xchg %ax,%ax
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
10b1a8: 8b 43 08 mov 0x8(%ebx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b1ab: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10b1b2: c7 43 64 5c b3 10 00 movl $0x10b35c,0x64(%ebx)
the_watchdog->id = id;
10b1b9: 89 43 68 mov %eax,0x68(%ebx)
the_watchdog->user_data = user_data;
10b1bc: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b1c3: 8b 45 dc mov -0x24(%ebp),%eax
10b1c6: 89 43 54 mov %eax,0x54(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b1c9: 83 ec 08 sub $0x8,%esp
&executing->Timer,
_Event_Timeout,
executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
10b1cc: 8d 43 48 lea 0x48(%ebx),%eax
10b1cf: 50 push %eax
10b1d0: 68 20 7f 12 00 push $0x127f20
10b1d5: e8 a2 35 00 00 call 10e77c <_Watchdog_Insert>
10b1da: 83 c4 10 add $0x10,%esp
10b1dd: e9 46 ff ff ff jmp 10b128 <_Event_Seize+0x70>
0010b238 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
10b238: 55 push %ebp
10b239: 89 e5 mov %esp,%ebp
10b23b: 57 push %edi
10b23c: 56 push %esi
10b23d: 53 push %ebx
10b23e: 83 ec 2c sub $0x2c,%esp
10b241: 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 ];
10b244: 8b 8b e8 00 00 00 mov 0xe8(%ebx),%ecx
option_set = (rtems_option) the_thread->Wait.option;
10b24a: 8b 7b 30 mov 0x30(%ebx),%edi
_ISR_Disable( level );
10b24d: 9c pushf
10b24e: fa cli
10b24f: 8f 45 d4 popl -0x2c(%ebp)
pending_events = api->pending_events;
10b252: 8b 11 mov (%ecx),%edx
event_condition = (rtems_event_set) the_thread->Wait.count;
10b254: 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 ) ) {
10b257: 89 c6 mov %eax,%esi
10b259: 21 d6 and %edx,%esi
10b25b: 89 75 e4 mov %esi,-0x1c(%ebp)
10b25e: 74 74 je 10b2d4 <_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() &&
10b260: 8b 35 f4 83 12 00 mov 0x1283f4,%esi
10b266: 85 f6 test %esi,%esi
10b268: 74 0c je 10b276 <_Event_Surrender+0x3e>
10b26a: 3b 1d f8 83 12 00 cmp 0x1283f8,%ebx
10b270: 0f 84 96 00 00 00 je 10b30c <_Event_Surrender+0xd4>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
10b276: f6 43 11 01 testb $0x1,0x11(%ebx)
10b27a: 74 4c je 10b2c8 <_Event_Surrender+0x90>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
10b27c: 3b 45 e4 cmp -0x1c(%ebp),%eax
10b27f: 74 05 je 10b286 <_Event_Surrender+0x4e>
10b281: 83 e7 02 and $0x2,%edi
10b284: 74 42 je 10b2c8 <_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) );
10b286: 8b 45 e4 mov -0x1c(%ebp),%eax
10b289: f7 d0 not %eax
10b28b: 21 d0 and %edx,%eax
10b28d: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
10b28f: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b296: 8b 43 28 mov 0x28(%ebx),%eax
10b299: 8b 75 e4 mov -0x1c(%ebp),%esi
10b29c: 89 30 mov %esi,(%eax)
_ISR_Flash( level );
10b29e: ff 75 d4 pushl -0x2c(%ebp)
10b2a1: 9d popf
10b2a2: fa cli
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10b2a3: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10b2a7: 74 37 je 10b2e0 <_Event_Surrender+0xa8>
_ISR_Enable( level );
10b2a9: ff 75 d4 pushl -0x2c(%ebp)
10b2ac: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10b2ad: 83 ec 08 sub $0x8,%esp
10b2b0: 68 f8 ff 03 10 push $0x1003fff8
10b2b5: 53 push %ebx
10b2b6: e8 e9 23 00 00 call 10d6a4 <_Thread_Clear_state>
10b2bb: 83 c4 10 add $0x10,%esp
}
return;
}
}
_ISR_Enable( level );
}
10b2be: 8d 65 f4 lea -0xc(%ebp),%esp
10b2c1: 5b pop %ebx
10b2c2: 5e pop %esi
10b2c3: 5f pop %edi
10b2c4: c9 leave
10b2c5: c3 ret
10b2c6: 66 90 xchg %ax,%ax
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
10b2c8: ff 75 d4 pushl -0x2c(%ebp)
10b2cb: 9d popf
}
10b2cc: 8d 65 f4 lea -0xc(%ebp),%esp
10b2cf: 5b pop %ebx
10b2d0: 5e pop %esi
10b2d1: 5f pop %edi
10b2d2: c9 leave
10b2d3: c3 ret
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
10b2d4: ff 75 d4 pushl -0x2c(%ebp)
10b2d7: 9d popf
}
return;
}
}
_ISR_Enable( level );
}
10b2d8: 8d 65 f4 lea -0xc(%ebp),%esp
10b2db: 5b pop %ebx
10b2dc: 5e pop %esi
10b2dd: 5f pop %edi
10b2de: c9 leave
10b2df: c3 ret
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10b2e0: 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 );
10b2e7: ff 75 d4 pushl -0x2c(%ebp)
10b2ea: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10b2eb: 83 ec 0c sub $0xc,%esp
10b2ee: 8d 43 48 lea 0x48(%ebx),%eax
10b2f1: 50 push %eax
10b2f2: e8 c5 35 00 00 call 10e8bc <_Watchdog_Remove>
10b2f7: 58 pop %eax
10b2f8: 5a pop %edx
10b2f9: 68 f8 ff 03 10 push $0x1003fff8
10b2fe: 53 push %ebx
10b2ff: e8 a0 23 00 00 call 10d6a4 <_Thread_Clear_state>
10b304: 83 c4 10 add $0x10,%esp
10b307: eb c3 jmp 10b2cc <_Event_Surrender+0x94>
10b309: 8d 76 00 lea 0x0(%esi),%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) ||
10b30c: 8b 35 28 88 12 00 mov 0x128828,%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 ) &&
10b312: 83 fe 02 cmp $0x2,%esi
10b315: 74 0d je 10b324 <_Event_Surrender+0xec> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
10b317: 8b 35 28 88 12 00 mov 0x128828,%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) ||
10b31d: 4e dec %esi
10b31e: 0f 85 52 ff ff ff jne 10b276 <_Event_Surrender+0x3e>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
10b324: 3b 45 e4 cmp -0x1c(%ebp),%eax
10b327: 74 05 je 10b32e <_Event_Surrender+0xf6>
10b329: 83 e7 02 and $0x2,%edi
10b32c: 74 22 je 10b350 <_Event_Surrender+0x118><== NEVER TAKEN
10b32e: 8b 45 e4 mov -0x1c(%ebp),%eax
10b331: f7 d0 not %eax
10b333: 21 d0 and %edx,%eax
10b335: 89 01 mov %eax,(%ecx)
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
10b337: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
10b33e: 8b 43 28 mov 0x28(%ebx),%eax
10b341: 8b 55 e4 mov -0x1c(%ebp),%edx
10b344: 89 10 mov %edx,(%eax)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
10b346: c7 05 28 88 12 00 03 movl $0x3,0x128828
10b34d: 00 00 00
}
_ISR_Enable( level );
10b350: ff 75 d4 pushl -0x2c(%ebp)
10b353: 9d popf
return;
10b354: e9 73 ff ff ff jmp 10b2cc <_Event_Surrender+0x94>
0010b35c <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
10b35c: 55 push %ebp
10b35d: 89 e5 mov %esp,%ebp
10b35f: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
10b362: 8d 45 f4 lea -0xc(%ebp),%eax
10b365: 50 push %eax
10b366: ff 75 08 pushl 0x8(%ebp)
10b369: e8 be 26 00 00 call 10da2c <_Thread_Get>
switch ( location ) {
10b36e: 83 c4 10 add $0x10,%esp
10b371: 8b 55 f4 mov -0xc(%ebp),%edx
10b374: 85 d2 test %edx,%edx
10b376: 75 37 jne 10b3af <_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 );
10b378: 9c pushf
10b379: fa cli
10b37a: 5a pop %edx
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
10b37b: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax)
if ( _Thread_Is_executing( the_thread ) ) {
10b382: 3b 05 f8 83 12 00 cmp 0x1283f8,%eax
10b388: 74 2a je 10b3b4 <_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;
10b38a: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax)
_ISR_Enable( level );
10b391: 52 push %edx
10b392: 9d popf
10b393: 83 ec 08 sub $0x8,%esp
10b396: 68 f8 ff 03 10 push $0x1003fff8
10b39b: 50 push %eax
10b39c: e8 03 23 00 00 call 10d6a4 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10b3a1: a1 50 7e 12 00 mov 0x127e50,%eax
10b3a6: 48 dec %eax
10b3a7: a3 50 7e 12 00 mov %eax,0x127e50
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
10b3ac: 83 c4 10 add $0x10,%esp
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10b3af: c9 leave
10b3b0: c3 ret
10b3b1: 8d 76 00 lea 0x0(%esi),%esi
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
10b3b4: 8b 0d 28 88 12 00 mov 0x128828,%ecx
10b3ba: 49 dec %ecx
10b3bb: 75 cd jne 10b38a <_Event_Timeout+0x2e>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
10b3bd: c7 05 28 88 12 00 02 movl $0x2,0x128828
10b3c4: 00 00 00
10b3c7: eb c1 jmp 10b38a <_Event_Timeout+0x2e>
00111374 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
111374: 55 push %ebp
111375: 89 e5 mov %esp,%ebp
111377: 57 push %edi
111378: 56 push %esi
111379: 53 push %ebx
11137a: 83 ec 2c sub $0x2c,%esp
11137d: 8b 7d 0c mov 0xc(%ebp),%edi
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
111380: 8d 47 04 lea 0x4(%edi),%eax
111383: 89 45 dc mov %eax,-0x24(%ebp)
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
111386: 8b 55 08 mov 0x8(%ebp),%edx
111389: 8b 52 10 mov 0x10(%edx),%edx
11138c: 89 55 cc mov %edx,-0x34(%ebp)
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
11138f: 39 c7 cmp %eax,%edi
111391: 0f 87 69 01 00 00 ja 111500 <_Heap_Allocate_aligned_with_boundary+0x18c>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
111397: 8b 5d 14 mov 0x14(%ebp),%ebx
11139a: 85 db test %ebx,%ebx
11139c: 0f 85 56 01 00 00 jne 1114f8 <_Heap_Allocate_aligned_with_boundary+0x184>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
1113a2: 8b 45 08 mov 0x8(%ebp),%eax
1113a5: 8b 48 08 mov 0x8(%eax),%ecx
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
1113a8: 39 c8 cmp %ecx,%eax
1113aa: 0f 84 50 01 00 00 je 111500 <_Heap_Allocate_aligned_with_boundary+0x18c>
1113b0: c7 45 e4 01 00 00 00 movl $0x1,-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
1113b7: 8b 55 cc mov -0x34(%ebp),%edx
1113ba: 83 c2 07 add $0x7,%edx
1113bd: 89 55 c8 mov %edx,-0x38(%ebp)
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
1113c0: c7 45 d0 04 00 00 00 movl $0x4,-0x30(%ebp)
1113c7: 29 7d d0 sub %edi,-0x30(%ebp)
1113ca: eb 1e jmp 1113ea <_Heap_Allocate_aligned_with_boundary+0x76>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
1113cc: 8d 59 08 lea 0x8(%ecx),%ebx
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
1113cf: 85 db test %ebx,%ebx
1113d1: 0f 85 f1 00 00 00 jne 1114c8 <_Heap_Allocate_aligned_with_boundary+0x154><== ALWAYS TAKEN
break;
}
block = block->next;
1113d7: 8b 49 08 mov 0x8(%ecx),%ecx
1113da: 8b 45 e4 mov -0x1c(%ebp),%eax
1113dd: 40 inc %eax
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
1113de: 39 4d 08 cmp %ecx,0x8(%ebp)
1113e1: 0f 84 25 01 00 00 je 11150c <_Heap_Allocate_aligned_with_boundary+0x198>
1113e7: 89 45 e4 mov %eax,-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 ) {
1113ea: 8b 59 04 mov 0x4(%ecx),%ebx
1113ed: 39 5d dc cmp %ebx,-0x24(%ebp)
1113f0: 73 e5 jae 1113d7 <_Heap_Allocate_aligned_with_boundary+0x63>
if ( alignment == 0 ) {
1113f2: 8b 55 10 mov 0x10(%ebp),%edx
1113f5: 85 d2 test %edx,%edx
1113f7: 74 d3 je 1113cc <_Heap_Allocate_aligned_with_boundary+0x58>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
1113f9: 8b 45 08 mov 0x8(%ebp),%eax
1113fc: 8b 40 14 mov 0x14(%eax),%eax
1113ff: 89 45 d8 mov %eax,-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;
111402: 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;
111405: 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;
111408: 8d 51 08 lea 0x8(%ecx),%edx
11140b: 89 55 d4 mov %edx,-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;
11140e: 8b 75 c8 mov -0x38(%ebp),%esi
111411: 29 c6 sub %eax,%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
111413: 01 de add %ebx,%esi
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
111415: 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);
111418: 89 d8 mov %ebx,%eax
11141a: 31 d2 xor %edx,%edx
11141c: f7 75 10 divl 0x10(%ebp)
11141f: 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 ) {
111421: 39 de cmp %ebx,%esi
111423: 73 0b jae 111430 <_Heap_Allocate_aligned_with_boundary+0xbc>
111425: 89 f0 mov %esi,%eax
111427: 31 d2 xor %edx,%edx
111429: f7 75 10 divl 0x10(%ebp)
11142c: 89 f3 mov %esi,%ebx
11142e: 29 d3 sub %edx,%ebx
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
111430: 8b 45 14 mov 0x14(%ebp),%eax
111433: 85 c0 test %eax,%eax
111435: 74 5b je 111492 <_Heap_Allocate_aligned_with_boundary+0x11e>
/* 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;
111437: 8d 34 3b lea (%ebx,%edi,1),%esi
11143a: 89 f0 mov %esi,%eax
11143c: 31 d2 xor %edx,%edx
11143e: f7 75 14 divl 0x14(%ebp)
111441: 89 f0 mov %esi,%eax
111443: 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 ) {
111445: 39 c3 cmp %eax,%ebx
111447: 73 49 jae 111492 <_Heap_Allocate_aligned_with_boundary+0x11e>
111449: 39 c6 cmp %eax,%esi
11144b: 76 45 jbe 111492 <_Heap_Allocate_aligned_with_boundary+0x11e>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
11144d: 8b 55 d4 mov -0x2c(%ebp),%edx
111450: 01 fa add %edi,%edx
111452: 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 ) {
111455: 39 c2 cmp %eax,%edx
111457: 0f 87 7a ff ff ff ja 1113d7 <_Heap_Allocate_aligned_with_boundary+0x63>
11145d: 89 ce mov %ecx,%esi
11145f: eb 10 jmp 111471 <_Heap_Allocate_aligned_with_boundary+0xfd>
111461: 8d 76 00 lea 0x0(%esi),%esi
/* 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 ) {
111464: 39 c1 cmp %eax,%ecx
111466: 76 28 jbe 111490 <_Heap_Allocate_aligned_with_boundary+0x11c>
if ( boundary_line < boundary_floor ) {
111468: 39 45 e0 cmp %eax,-0x20(%ebp)
11146b: 0f 87 9f 00 00 00 ja 111510 <_Heap_Allocate_aligned_with_boundary+0x19c><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
111471: 89 c3 mov %eax,%ebx
111473: 29 fb sub %edi,%ebx
111475: 89 d8 mov %ebx,%eax
111477: 31 d2 xor %edx,%edx
111479: f7 75 10 divl 0x10(%ebp)
11147c: 29 d3 sub %edx,%ebx
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
11147e: 8d 0c 3b lea (%ebx,%edi,1),%ecx
111481: 89 c8 mov %ecx,%eax
111483: 31 d2 xor %edx,%edx
111485: f7 75 14 divl 0x14(%ebp)
111488: 89 c8 mov %ecx,%eax
11148a: 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 ) {
11148c: 39 c3 cmp %eax,%ebx
11148e: 72 d4 jb 111464 <_Heap_Allocate_aligned_with_boundary+0xf0>
111490: 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 ) {
111492: 39 5d d4 cmp %ebx,-0x2c(%ebp)
111495: 0f 87 3c ff ff ff ja 1113d7 <_Heap_Allocate_aligned_with_boundary+0x63>
11149b: be f8 ff ff ff mov $0xfffffff8,%esi
1114a0: 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);
1114a2: 01 de add %ebx,%esi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
1114a4: 89 d8 mov %ebx,%eax
1114a6: 31 d2 xor %edx,%edx
1114a8: 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;
1114ab: 29 d6 sub %edx,%esi
if ( free_size >= min_block_size || free_size == 0 ) {
1114ad: 39 75 d8 cmp %esi,-0x28(%ebp)
1114b0: 0f 86 19 ff ff ff jbe 1113cf <_Heap_Allocate_aligned_with_boundary+0x5b>
1114b6: 85 f6 test %esi,%esi
1114b8: 0f 85 19 ff ff ff jne 1113d7 <_Heap_Allocate_aligned_with_boundary+0x63>
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
1114be: 85 db test %ebx,%ebx
1114c0: 0f 84 11 ff ff ff je 1113d7 <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN
1114c6: 66 90 xchg %ax,%ax
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
1114c8: 8b 45 08 mov 0x8(%ebp),%eax
1114cb: ff 40 48 incl 0x48(%eax)
stats->searches += search_count;
1114ce: 8b 55 e4 mov -0x1c(%ebp),%edx
1114d1: 01 50 4c add %edx,0x4c(%eax)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
1114d4: 57 push %edi
1114d5: 53 push %ebx
1114d6: 51 push %ecx
1114d7: 50 push %eax
1114d8: e8 6b b3 ff ff call 10c848 <_Heap_Block_allocate>
1114dd: 89 d8 mov %ebx,%eax
1114df: 83 c4 10 add $0x10,%esp
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
1114e2: 8b 55 e4 mov -0x1c(%ebp),%edx
1114e5: 8b 4d 08 mov 0x8(%ebp),%ecx
1114e8: 39 51 44 cmp %edx,0x44(%ecx)
1114eb: 73 15 jae 111502 <_Heap_Allocate_aligned_with_boundary+0x18e>
stats->max_search = search_count;
1114ed: 89 51 44 mov %edx,0x44(%ecx)
}
return (void *) alloc_begin;
}
1114f0: 8d 65 f4 lea -0xc(%ebp),%esp
1114f3: 5b pop %ebx
1114f4: 5e pop %esi
1114f5: 5f pop %edi
1114f6: c9 leave
1114f7: c3 ret
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
1114f8: 3b 7d 14 cmp 0x14(%ebp),%edi
1114fb: 76 1a jbe 111517 <_Heap_Allocate_aligned_with_boundary+0x1a3>
1114fd: 8d 76 00 lea 0x0(%esi),%esi
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
111500: 31 c0 xor %eax,%eax
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
111502: 8d 65 f4 lea -0xc(%ebp),%esp
111505: 5b pop %ebx
111506: 5e pop %esi
111507: 5f pop %edi
111508: c9 leave
111509: c3 ret
11150a: 66 90 xchg %ax,%ax
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
11150c: 31 c0 xor %eax,%eax
11150e: eb d2 jmp 1114e2 <_Heap_Allocate_aligned_with_boundary+0x16e>
111510: 89 f1 mov %esi,%ecx <== NOT EXECUTED
111512: e9 c0 fe ff ff jmp 1113d7 <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
111517: 8b 4d 10 mov 0x10(%ebp),%ecx
11151a: 85 c9 test %ecx,%ecx
11151c: 0f 85 80 fe ff ff jne 1113a2 <_Heap_Allocate_aligned_with_boundary+0x2e>
alignment = page_size;
111522: 89 55 10 mov %edx,0x10(%ebp)
111525: e9 78 fe ff ff jmp 1113a2 <_Heap_Allocate_aligned_with_boundary+0x2e>
00111908 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
111908: 55 push %ebp
111909: 89 e5 mov %esp,%ebp
11190b: 57 push %edi
11190c: 56 push %esi
11190d: 53 push %ebx
11190e: 83 ec 4c sub $0x4c,%esp
111911: 8b 5d 08 mov 0x8(%ebp),%ebx
111914: 8b 4d 10 mov 0x10(%ebp),%ecx
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
111917: 8b 43 20 mov 0x20(%ebx),%eax
11191a: 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;
11191d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
Heap_Block *extend_last_block = NULL;
111924: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
uintptr_t const page_size = heap->page_size;
11192b: 8b 53 10 mov 0x10(%ebx),%edx
11192e: 89 55 d4 mov %edx,-0x2c(%ebp)
uintptr_t const min_block_size = heap->min_block_size;
111931: 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;
111934: 8b 73 30 mov 0x30(%ebx),%esi
111937: 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 ) {
11193a: 8b 55 0c mov 0xc(%ebp),%edx
11193d: 01 ca add %ecx,%edx
11193f: 89 55 cc mov %edx,-0x34(%ebp)
111942: 73 0c jae 111950 <_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;
111944: 31 c0 xor %eax,%eax
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
111946: 8d 65 f4 lea -0xc(%ebp),%esp
111949: 5b pop %ebx
11194a: 5e pop %esi
11194b: 5f pop %edi
11194c: c9 leave
11194d: c3 ret
11194e: 66 90 xchg %ax,%ax
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
111950: 83 ec 08 sub $0x8,%esp
111953: 8d 55 e0 lea -0x20(%ebp),%edx
111956: 52 push %edx
111957: 8d 55 e4 lea -0x1c(%ebp),%edx
11195a: 52 push %edx
11195b: 50 push %eax
11195c: ff 75 d4 pushl -0x2c(%ebp)
11195f: 51 push %ecx
111960: ff 75 0c pushl 0xc(%ebp)
111963: e8 fc b0 ff ff call 10ca64 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
111968: 83 c4 20 add $0x20,%esp
11196b: 84 c0 test %al,%al
11196d: 74 d5 je 111944 <_Heap_Extend+0x3c>
11196f: 8b 7d d0 mov -0x30(%ebp),%edi
111972: c7 45 bc 00 00 00 00 movl $0x0,-0x44(%ebp)
111979: c7 45 b8 00 00 00 00 movl $0x0,-0x48(%ebp)
111980: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp)
111987: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
11198e: 8b 75 cc mov -0x34(%ebp),%esi
111991: 89 5d b4 mov %ebx,-0x4c(%ebp)
111994: eb 30 jmp 1119c6 <_Heap_Extend+0xbe>
111996: 66 90 xchg %ax,%ax
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
111998: 39 ce cmp %ecx,%esi
11199a: 73 03 jae 11199f <_Heap_Extend+0x97>
11199c: 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);
11199f: 8d 59 f8 lea -0x8(%ecx),%ebx
1119a2: 89 c8 mov %ecx,%eax
1119a4: 31 d2 xor %edx,%edx
1119a6: 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);
1119a9: 29 d3 sub %edx,%ebx
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
1119ab: 3b 4d 0c cmp 0xc(%ebp),%ecx
1119ae: 74 3c je 1119ec <_Heap_Extend+0xe4>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
1119b0: 39 4d 0c cmp %ecx,0xc(%ebp)
1119b3: 76 03 jbe 1119b8 <_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 )
1119b5: 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;
1119b8: 8b 7b 04 mov 0x4(%ebx),%edi
1119bb: 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);
1119be: 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 );
1119c1: 39 7d d0 cmp %edi,-0x30(%ebp)
1119c4: 74 39 je 1119ff <_Heap_Extend+0xf7>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
1119c6: 3b 7d d0 cmp -0x30(%ebp),%edi
1119c9: 0f 84 39 01 00 00 je 111b08 <_Heap_Extend+0x200>
1119cf: 89 f8 mov %edi,%eax
uintptr_t const sub_area_end = start_block->prev_size;
1119d1: 8b 0f mov (%edi),%ecx
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
1119d3: 39 4d 0c cmp %ecx,0xc(%ebp)
1119d6: 73 08 jae 1119e0 <_Heap_Extend+0xd8>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
1119d8: 39 f0 cmp %esi,%eax
1119da: 0f 82 64 ff ff ff jb 111944 <_Heap_Extend+0x3c>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
1119e0: 39 f0 cmp %esi,%eax
1119e2: 75 b4 jne 111998 <_Heap_Extend+0x90>
1119e4: 89 7d c4 mov %edi,-0x3c(%ebp)
1119e7: eb b6 jmp 11199f <_Heap_Extend+0x97>
1119e9: 8d 76 00 lea 0x0(%esi),%esi
} 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;
1119ec: 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 )
1119ee: 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;
1119f1: 8b 7b 04 mov 0x4(%ebx),%edi
1119f4: 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);
1119f7: 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 );
1119fa: 39 7d d0 cmp %edi,-0x30(%ebp)
1119fd: 75 c7 jne 1119c6 <_Heap_Extend+0xbe> <== NEVER TAKEN
1119ff: 8b 5d b4 mov -0x4c(%ebp),%ebx
if ( extend_area_begin < heap->area_begin ) {
111a02: 8b 75 0c mov 0xc(%ebp),%esi
111a05: 3b 73 18 cmp 0x18(%ebx),%esi
111a08: 0f 82 06 01 00 00 jb 111b14 <_Heap_Extend+0x20c>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
111a0e: 8b 45 cc mov -0x34(%ebp),%eax
111a11: 3b 43 1c cmp 0x1c(%ebx),%eax
111a14: 76 03 jbe 111a19 <_Heap_Extend+0x111>
heap->area_end = extend_area_end;
111a16: 89 43 1c mov %eax,0x1c(%ebx)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
111a19: 8b 55 e0 mov -0x20(%ebp),%edx
111a1c: 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 =
111a1f: 89 d1 mov %edx,%ecx
111a21: 29 c1 sub %eax,%ecx
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
111a23: 8b 75 cc mov -0x34(%ebp),%esi
111a26: 89 30 mov %esi,(%eax)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
111a28: 89 ce mov %ecx,%esi
111a2a: 83 ce 01 or $0x1,%esi
111a2d: 89 70 04 mov %esi,0x4(%eax)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
111a30: 89 0a mov %ecx,(%edx)
extend_last_block->size_and_flag = 0;
111a32: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
111a39: 39 43 20 cmp %eax,0x20(%ebx)
111a3c: 0f 86 da 00 00 00 jbe 111b1c <_Heap_Extend+0x214>
heap->first_block = extend_first_block;
111a42: 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 ) {
111a45: 8b 75 c4 mov -0x3c(%ebp),%esi
111a48: 85 f6 test %esi,%esi
111a4a: 0f 84 10 01 00 00 je 111b60 <_Heap_Extend+0x258>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
111a50: 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 );
111a53: 8b 4d 0c mov 0xc(%ebp),%ecx
111a56: 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;
111a59: 89 c8 mov %ecx,%eax
111a5b: 31 d2 xor %edx,%edx
111a5d: f7 f6 div %esi
if ( remainder != 0 ) {
111a5f: 85 d2 test %edx,%edx
111a61: 0f 84 c9 00 00 00 je 111b30 <_Heap_Extend+0x228>
return value - remainder + alignment;
111a67: 8d 04 31 lea (%ecx,%esi,1),%eax
111a6a: 29 d0 sub %edx,%eax
uintptr_t const new_first_block_begin =
111a6c: 8d 50 f8 lea -0x8(%eax),%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;
111a6f: 8b 75 c4 mov -0x3c(%ebp),%esi
111a72: 8b 0e mov (%esi),%ecx
111a74: 89 48 f8 mov %ecx,-0x8(%eax)
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 =
111a77: 89 f0 mov %esi,%eax
111a79: 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;
111a7b: 83 c8 01 or $0x1,%eax
111a7e: 89 42 04 mov %eax,0x4(%edx)
_Heap_Free_block( heap, new_first_block );
111a81: 89 d8 mov %ebx,%eax
111a83: e8 64 fe ff ff call 1118ec <_Heap_Free_block>
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
111a88: 8b 45 c8 mov -0x38(%ebp),%eax
111a8b: 85 c0 test %eax,%eax
111a8d: 0f 84 a5 00 00 00 je 111b38 <_Heap_Extend+0x230>
)
{
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,
111a93: 8b 4d cc mov -0x34(%ebp),%ecx
111a96: 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(
111a99: 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);
111a9c: 89 c8 mov %ecx,%eax
111a9e: 31 d2 xor %edx,%edx
111aa0: f7 73 10 divl 0x10(%ebx)
111aa3: 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)
111aa5: 8b 55 c8 mov -0x38(%ebp),%edx
111aa8: 8b 42 04 mov 0x4(%edx),%eax
111aab: 29 c8 sub %ecx,%eax
| HEAP_PREV_BLOCK_USED;
111aad: 83 c8 01 or $0x1,%eax
111ab0: 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;
111ab4: 8b 42 04 mov 0x4(%edx),%eax
111ab7: 83 e0 01 and $0x1,%eax
block->size_and_flag = size | flag;
111aba: 09 c8 or %ecx,%eax
111abc: 89 42 04 mov %eax,0x4(%edx)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
111abf: 89 d8 mov %ebx,%eax
111ac1: e8 26 fe ff ff call 1118ec <_Heap_Free_block>
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
111ac6: 8b 75 c4 mov -0x3c(%ebp),%esi
111ac9: 85 f6 test %esi,%esi
111acb: 0f 84 ab 00 00 00 je 111b7c <_Heap_Extend+0x274>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
111ad1: 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(
111ad4: 8b 43 20 mov 0x20(%ebx),%eax
111ad7: 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;
111ad9: 8b 4a 04 mov 0x4(%edx),%ecx
111adc: 83 e1 01 and $0x1,%ecx
block->size_and_flag = size | flag;
111adf: 09 c8 or %ecx,%eax
111ae1: 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;
111ae4: 8b 43 30 mov 0x30(%ebx),%eax
111ae7: 2b 45 c0 sub -0x40(%ebp),%eax
/* Statistics */
stats->size += extended_size;
111aea: 01 43 2c add %eax,0x2c(%ebx)
if ( extended_size_ptr != NULL )
111aed: 8b 55 14 mov 0x14(%ebp),%edx
111af0: 85 d2 test %edx,%edx
111af2: 0f 84 a0 00 00 00 je 111b98 <_Heap_Extend+0x290> <== NEVER TAKEN
*extended_size_ptr = extended_size;
111af8: 8b 55 14 mov 0x14(%ebp),%edx
111afb: 89 02 mov %eax,(%edx)
return true;
111afd: b0 01 mov $0x1,%al
}
111aff: 8d 65 f4 lea -0xc(%ebp),%esp
111b02: 5b pop %ebx
111b03: 5e pop %esi
111b04: 5f pop %edi
111b05: c9 leave
111b06: c3 ret
111b07: 90 nop
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
111b08: 8b 55 b4 mov -0x4c(%ebp),%edx
111b0b: 8b 42 18 mov 0x18(%edx),%eax
111b0e: e9 be fe ff ff jmp 1119d1 <_Heap_Extend+0xc9>
111b13: 90 nop
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;
111b14: 89 73 18 mov %esi,0x18(%ebx)
111b17: e9 fd fe ff ff jmp 111a19 <_Heap_Extend+0x111>
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
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 ) {
111b1c: 39 53 24 cmp %edx,0x24(%ebx)
111b1f: 0f 83 20 ff ff ff jae 111a45 <_Heap_Extend+0x13d>
heap->last_block = extend_last_block;
111b25: 89 53 24 mov %edx,0x24(%ebx)
111b28: e9 18 ff ff ff jmp 111a45 <_Heap_Extend+0x13d>
111b2d: 8d 76 00 lea 0x0(%esi),%esi
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
return value - remainder + alignment;
} else {
return value;
111b30: 89 c8 mov %ecx,%eax
111b32: e9 35 ff ff ff jmp 111a6c <_Heap_Extend+0x164>
111b37: 90 nop
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
111b38: 8b 7d bc mov -0x44(%ebp),%edi
111b3b: 85 ff test %edi,%edi
111b3d: 74 87 je 111ac6 <_Heap_Extend+0x1be>
_Heap_Link_above(
111b3f: 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 );
111b42: 8b 45 e4 mov -0x1c(%ebp),%eax
111b45: 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;
111b48: 8b 75 bc mov -0x44(%ebp),%esi
111b4b: 8b 56 04 mov 0x4(%esi),%edx
111b4e: 83 e2 01 and $0x1,%edx
block->size_and_flag = size | flag;
111b51: 09 d0 or %edx,%eax
111b53: 89 46 04 mov %eax,0x4(%esi)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
111b56: 83 49 04 01 orl $0x1,0x4(%ecx)
111b5a: e9 67 ff ff ff jmp 111ac6 <_Heap_Extend+0x1be>
111b5f: 90 nop
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 ) {
111b60: 8b 4d b8 mov -0x48(%ebp),%ecx
111b63: 85 c9 test %ecx,%ecx
111b65: 0f 84 1d ff ff ff je 111a88 <_Heap_Extend+0x180>
{
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;
111b6b: 8b 45 b8 mov -0x48(%ebp),%eax
111b6e: 29 d0 sub %edx,%eax
111b70: 83 c8 01 or $0x1,%eax
111b73: 89 42 04 mov %eax,0x4(%edx)
111b76: e9 0d ff ff ff jmp 111a88 <_Heap_Extend+0x180>
111b7b: 90 nop
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
111b7c: 8b 4d c8 mov -0x38(%ebp),%ecx
111b7f: 85 c9 test %ecx,%ecx
111b81: 0f 85 4a ff ff ff jne 111ad1 <_Heap_Extend+0x1c9>
_Heap_Free_block( heap, extend_first_block );
111b87: 8b 55 e4 mov -0x1c(%ebp),%edx
111b8a: 89 d8 mov %ebx,%eax
111b8c: e8 5b fd ff ff call 1118ec <_Heap_Free_block>
111b91: e9 3b ff ff ff jmp 111ad1 <_Heap_Extend+0x1c9>
111b96: 66 90 xchg %ax,%ax
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
111b98: b0 01 mov $0x1,%al <== NOT EXECUTED
111b9a: e9 a7 fd ff ff jmp 111946 <_Heap_Extend+0x3e> <== NOT EXECUTED
0011152c <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
11152c: 55 push %ebp
11152d: 89 e5 mov %esp,%ebp
11152f: 57 push %edi
111530: 56 push %esi
111531: 53 push %ebx
111532: 83 ec 10 sub $0x10,%esp
111535: 8b 4d 08 mov 0x8(%ebp),%ecx
111538: 8b 45 0c mov 0xc(%ebp),%eax
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
11153b: 85 c0 test %eax,%eax
11153d: 0f 84 e9 00 00 00 je 11162c <_Heap_Free+0x100>
111543: 8d 58 f8 lea -0x8(%eax),%ebx
111546: 31 d2 xor %edx,%edx
111548: f7 71 10 divl 0x10(%ecx)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
11154b: 29 d3 sub %edx,%ebx
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
11154d: 8b 41 20 mov 0x20(%ecx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
111550: 39 c3 cmp %eax,%ebx
111552: 72 1c jb 111570 <_Heap_Free+0x44>
111554: 8b 71 24 mov 0x24(%ecx),%esi
111557: 39 f3 cmp %esi,%ebx
111559: 77 15 ja 111570 <_Heap_Free+0x44>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
11155b: 8b 53 04 mov 0x4(%ebx),%edx
11155e: 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;
111561: 83 e2 fe and $0xfffffffe,%edx
111564: 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);
111567: 8d 14 13 lea (%ebx,%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;
11156a: 39 d0 cmp %edx,%eax
11156c: 76 0e jbe 11157c <_Heap_Free+0x50> <== ALWAYS TAKEN
11156e: 66 90 xchg %ax,%ax
/* 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 );
111570: 31 c0 xor %eax,%eax
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
111572: 83 c4 10 add $0x10,%esp
111575: 5b pop %ebx
111576: 5e pop %esi
111577: 5f pop %edi
111578: c9 leave
111579: c3 ret
11157a: 66 90 xchg %ax,%ax
11157c: 39 d6 cmp %edx,%esi
11157e: 72 f0 jb 111570 <_Heap_Free+0x44> <== NEVER TAKEN
111580: 8b 7a 04 mov 0x4(%edx),%edi
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
111583: f7 c7 01 00 00 00 test $0x1,%edi
111589: 74 e5 je 111570 <_Heap_Free+0x44> <== 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;
11158b: 83 e7 fe and $0xfffffffe,%edi
11158e: 89 7d e4 mov %edi,-0x1c(%ebp)
return true;
}
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 ));
111591: 39 d6 cmp %edx,%esi
111593: 0f 84 d3 00 00 00 je 11166c <_Heap_Free+0x140>
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
111599: f6 44 3a 04 01 testb $0x1,0x4(%edx,%edi,1)
11159e: 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 ) ) {
1115a2: f6 45 f0 01 testb $0x1,-0x10(%ebp)
1115a6: 75 44 jne 1115ec <_Heap_Free+0xc0>
uintptr_t const prev_size = block->prev_size;
1115a8: 8b 3b mov (%ebx),%edi
1115aa: 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);
1115ad: 29 fb sub %edi,%ebx
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;
1115af: 39 d8 cmp %ebx,%eax
1115b1: 77 bd ja 111570 <_Heap_Free+0x44> <== NEVER TAKEN
1115b3: 39 de cmp %ebx,%esi
1115b5: 72 b9 jb 111570 <_Heap_Free+0x44> <== 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) ) {
1115b7: f6 43 04 01 testb $0x1,0x4(%ebx)
1115bb: 74 b3 je 111570 <_Heap_Free+0x44> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
1115bd: 80 7d eb 00 cmpb $0x0,-0x15(%ebp)
1115c1: 0f 84 b1 00 00 00 je 111678 <_Heap_Free+0x14c>
uintptr_t const size = block_size + prev_size + next_block_size;
1115c7: 8b 7d e4 mov -0x1c(%ebp),%edi
1115ca: 03 7d ec add -0x14(%ebp),%edi
1115cd: 03 7d f0 add -0x10(%ebp),%edi
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
1115d0: 8b 42 08 mov 0x8(%edx),%eax
1115d3: 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;
1115d6: 89 42 08 mov %eax,0x8(%edx)
next->prev = prev;
1115d9: 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;
1115dc: ff 49 38 decl 0x38(%ecx)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
1115df: 89 f8 mov %edi,%eax
1115e1: 83 c8 01 or $0x1,%eax
1115e4: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
1115e7: 89 3c 3b mov %edi,(%ebx,%edi,1)
1115ea: eb 29 jmp 111615 <_Heap_Free+0xe9>
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 */
1115ec: 80 7d eb 00 cmpb $0x0,-0x15(%ebp)
1115f0: 74 46 je 111638 <_Heap_Free+0x10c>
uintptr_t const size = block_size + next_block_size;
1115f2: 8b 7d e4 mov -0x1c(%ebp),%edi
1115f5: 03 7d ec add -0x14(%ebp),%edi
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
1115f8: 8b 42 08 mov 0x8(%edx),%eax
1115fb: 8b 52 0c mov 0xc(%edx),%edx
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
1115fe: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = prev;
111601: 89 53 0c mov %edx,0xc(%ebx)
next->prev = new_block;
111604: 89 58 0c mov %ebx,0xc(%eax)
prev->next = new_block;
111607: 89 5a 08 mov %ebx,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;
11160a: 89 f8 mov %edi,%eax
11160c: 83 c8 01 or $0x1,%eax
11160f: 89 43 04 mov %eax,0x4(%ebx)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
111612: 89 3c 3b mov %edi,(%ebx,%edi,1)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
111615: ff 49 40 decl 0x40(%ecx)
++stats->frees;
111618: ff 41 50 incl 0x50(%ecx)
stats->free_size += block_size;
11161b: 8b 55 ec mov -0x14(%ebp),%edx
11161e: 01 51 30 add %edx,0x30(%ecx)
return( true );
111621: b0 01 mov $0x1,%al
}
111623: 83 c4 10 add $0x10,%esp
111626: 5b pop %ebx
111627: 5e pop %esi
111628: 5f pop %edi
111629: c9 leave
11162a: c3 ret
11162b: 90 nop
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
11162c: b0 01 mov $0x1,%al
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
11162e: 83 c4 10 add $0x10,%esp
111631: 5b pop %ebx
111632: 5e pop %esi
111633: 5f pop %edi
111634: c9 leave
111635: c3 ret
111636: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
111638: 8b 41 08 mov 0x8(%ecx),%eax
new_block->next = next;
11163b: 89 43 08 mov %eax,0x8(%ebx)
new_block->prev = block_before;
11163e: 89 4b 0c mov %ecx,0xc(%ebx)
block_before->next = new_block;
111641: 89 59 08 mov %ebx,0x8(%ecx)
next->prev = new_block;
111644: 89 58 0c mov %ebx,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;
111647: 8b 45 ec mov -0x14(%ebp),%eax
11164a: 83 c8 01 or $0x1,%eax
11164d: 89 43 04 mov %eax,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
111650: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = block_size;
111654: 8b 45 ec mov -0x14(%ebp),%eax
111657: 89 02 mov %eax,(%edx)
/* Statistics */
++stats->free_blocks;
111659: 8b 41 38 mov 0x38(%ecx),%eax
11165c: 40 inc %eax
11165d: 89 41 38 mov %eax,0x38(%ecx)
if ( stats->max_free_blocks < stats->free_blocks ) {
111660: 3b 41 3c cmp 0x3c(%ecx),%eax
111663: 76 b0 jbe 111615 <_Heap_Free+0xe9>
stats->max_free_blocks = stats->free_blocks;
111665: 89 41 3c mov %eax,0x3c(%ecx)
111668: eb ab jmp 111615 <_Heap_Free+0xe9>
11166a: 66 90 xchg %ax,%ax
return true;
}
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 ));
11166c: c6 45 eb 00 movb $0x0,-0x15(%ebp)
111670: e9 2d ff ff ff jmp 1115a2 <_Heap_Free+0x76>
111675: 8d 76 00 lea 0x0(%esi),%esi
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;
111678: 8b 45 ec mov -0x14(%ebp),%eax
11167b: 03 45 f0 add -0x10(%ebp),%eax
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
11167e: 89 c6 mov %eax,%esi
111680: 83 ce 01 or $0x1,%esi
111683: 89 73 04 mov %esi,0x4(%ebx)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
111686: 83 62 04 fe andl $0xfffffffe,0x4(%edx)
next_block->prev_size = size;
11168a: 89 02 mov %eax,(%edx)
11168c: eb 87 jmp 111615 <_Heap_Free+0xe9>
0010c6d8 <_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
)
{
10c6d8: 55 push %ebp
10c6d9: 89 e5 mov %esp,%ebp
10c6db: 57 push %edi
10c6dc: 56 push %esi
10c6dd: 53 push %ebx
10c6de: 8b 4d 08 mov 0x8(%ebp),%ecx
10c6e1: 8b 7d 0c mov 0xc(%ebp),%edi
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
10c6e4: 8d 34 0f lea (%edi,%ecx,1),%esi
uintptr_t const alloc_area_begin =
_Heap_Align_up( heap_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
10c6e7: 8d 59 08 lea 0x8(%ecx),%ebx
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
10c6ea: 89 d8 mov %ebx,%eax
10c6ec: 31 d2 xor %edx,%edx
10c6ee: f7 75 10 divl 0x10(%ebp)
if ( remainder != 0 ) {
10c6f1: 85 d2 test %edx,%edx
10c6f3: 74 05 je 10c6fa <_Heap_Get_first_and_last_block+0x22>
return value - remainder + alignment;
10c6f5: 03 5d 10 add 0x10(%ebp),%ebx
10c6f8: 29 d3 sub %edx,%ebx
_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 (
10c6fa: 39 f1 cmp %esi,%ecx
10c6fc: 77 2e ja 10c72c <_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);
10c6fe: 8d 73 f8 lea -0x8(%ebx),%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 =
10c701: 29 cb sub %ecx,%ebx
Heap_Block *const last_block =
_Heap_Block_at( first_block, first_block_size );
if (
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
10c703: 39 df cmp %ebx,%edi
10c705: 76 25 jbe 10c72c <_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 );
10c707: 29 df sub %ebx,%edi
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
10c709: 89 f8 mov %edi,%eax
10c70b: 31 d2 xor %edx,%edx
10c70d: f7 75 10 divl 0x10(%ebp)
10c710: 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
10c712: 39 7d 14 cmp %edi,0x14(%ebp)
10c715: 77 15 ja 10c72c <_Heap_Get_first_and_last_block+0x54>
) {
/* Invalid area or area too small */
return false;
}
*first_block_ptr = first_block;
10c717: 8b 45 18 mov 0x18(%ebp),%eax
10c71a: 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);
10c71c: 01 f7 add %esi,%edi
10c71e: 8b 45 1c mov 0x1c(%ebp),%eax
10c721: 89 38 mov %edi,(%eax)
*last_block_ptr = last_block;
return true;
10c723: b0 01 mov $0x1,%al
}
10c725: 5b pop %ebx
10c726: 5e pop %esi
10c727: 5f pop %edi
10c728: c9 leave
10c729: c3 ret
10c72a: 66 90 xchg %ax,%ax
heap_area_end < heap_area_begin
|| heap_area_size <= overhead
|| first_block_size < min_block_size
) {
/* Invalid area or area too small */
return false;
10c72c: 31 c0 xor %eax,%eax
*first_block_ptr = first_block;
*last_block_ptr = last_block;
return true;
}
10c72e: 5b pop %ebx
10c72f: 5e pop %esi
10c730: 5f pop %edi
10c731: c9 leave
10c732: c3 ret
001152b0 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
1152b0: 55 push %ebp
1152b1: 89 e5 mov %esp,%ebp
1152b3: 57 push %edi
1152b4: 56 push %esi
1152b5: 53 push %ebx
1152b6: 8b 7d 0c mov 0xc(%ebp),%edi
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
1152b9: c7 07 00 00 00 00 movl $0x0,(%edi)
info->largest = 0;
1152bf: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
info->total = 0;
1152c6: 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;
}
}
1152cd: 8b 45 08 mov 0x8(%ebp),%eax
1152d0: 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);
1152d3: 39 d0 cmp %edx,%eax
1152d5: 74 31 je 115308 <_Heap_Get_free_information+0x58>
1152d7: b9 01 00 00 00 mov $0x1,%ecx
1152dc: 31 f6 xor %esi,%esi
1152de: 31 db xor %ebx,%ebx
1152e0: eb 07 jmp 1152e9 <_Heap_Get_free_information+0x39>
1152e2: 66 90 xchg %ax,%ax
1152e4: 8b 77 04 mov 0x4(%edi),%esi
1152e7: 89 c1 mov %eax,%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;
1152e9: 8b 42 04 mov 0x4(%edx),%eax
1152ec: 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;
1152ef: 01 c3 add %eax,%ebx
if ( info->largest < the_size )
1152f1: 39 f0 cmp %esi,%eax
1152f3: 76 03 jbe 1152f8 <_Heap_Get_free_information+0x48>
info->largest = the_size;
1152f5: 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)
1152f8: 8b 52 08 mov 0x8(%edx),%edx
1152fb: 8d 41 01 lea 0x1(%ecx),%eax
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
1152fe: 39 55 08 cmp %edx,0x8(%ebp)
115301: 75 e1 jne 1152e4 <_Heap_Get_free_information+0x34>
115303: 89 0f mov %ecx,(%edi)
115305: 89 5f 08 mov %ebx,0x8(%edi)
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
115308: 5b pop %ebx
115309: 5e pop %esi
11530a: 5f pop %edi
11530b: c9 leave
11530c: c3 ret
001120b8 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
1120b8: 55 push %ebp
1120b9: 89 e5 mov %esp,%ebp
1120bb: 57 push %edi
1120bc: 56 push %esi
1120bd: 53 push %ebx
1120be: 83 ec 04 sub $0x4,%esp
1120c1: 8b 45 08 mov 0x8(%ebp),%eax
1120c4: 8b 5d 0c mov 0xc(%ebp),%ebx
Heap_Block *the_block = the_heap->first_block;
1120c7: 8b 50 20 mov 0x20(%eax),%edx
Heap_Block *const end = the_heap->last_block;
1120ca: 8b 40 24 mov 0x24(%eax),%eax
1120cd: 89 45 f0 mov %eax,-0x10(%ebp)
memset(the_info, 0, sizeof(*the_info));
1120d0: b9 18 00 00 00 mov $0x18,%ecx
1120d5: 31 c0 xor %eax,%eax
1120d7: 89 df mov %ebx,%edi
1120d9: f3 aa rep stos %al,%es:(%edi)
while ( the_block != end ) {
1120db: 3b 55 f0 cmp -0x10(%ebp),%edx
1120de: 74 38 je 112118 <_Heap_Get_information+0x60><== NEVER TAKEN
1120e0: 8b 7a 04 mov 0x4(%edx),%edi
1120e3: eb 18 jmp 1120fd <_Heap_Get_information+0x45>
1120e5: 8d 76 00 lea 0x0(%esi),%esi
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;
1120e8: 8d 43 0c lea 0xc(%ebx),%eax
else
info = &the_info->Free;
info->number++;
1120eb: ff 00 incl (%eax)
info->total += the_size;
1120ed: 01 48 08 add %ecx,0x8(%eax)
if ( info->largest < the_size )
1120f0: 39 48 04 cmp %ecx,0x4(%eax)
1120f3: 73 03 jae 1120f8 <_Heap_Get_information+0x40>
info->largest = the_size;
1120f5: 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 ) {
1120f8: 39 75 f0 cmp %esi,-0x10(%ebp)
1120fb: 74 1b je 112118 <_Heap_Get_information+0x60>
- 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;
1120fd: 89 f9 mov %edi,%ecx
1120ff: 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);
112102: 8d 34 0a lea (%edx,%ecx,1),%esi
112105: 89 f2 mov %esi,%edx
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
112107: 8b 7e 04 mov 0x4(%esi),%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) )
11210a: f7 c7 01 00 00 00 test $0x1,%edi
112110: 75 d6 jne 1120e8 <_Heap_Get_information+0x30>
info = &the_info->Used;
else
info = &the_info->Free;
112112: 89 d8 mov %ebx,%eax
112114: eb d5 jmp 1120eb <_Heap_Get_information+0x33>
112116: 66 90 xchg %ax,%ax
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
112118: 58 pop %eax
112119: 5b pop %ebx
11211a: 5e pop %esi
11211b: 5f pop %edi
11211c: c9 leave
11211d: c3 ret
0011f5a8 <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
11f5a8: 55 push %ebp
11f5a9: 89 e5 mov %esp,%ebp
11f5ab: 57 push %edi
11f5ac: 56 push %esi
11f5ad: 53 push %ebx
11f5ae: 83 ec 2c sub $0x2c,%esp
11f5b1: 8b 5d 08 mov 0x8(%ebp),%ebx
11f5b4: 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);
11f5b7: 8d 4e f8 lea -0x8(%esi),%ecx
11f5ba: 89 f0 mov %esi,%eax
11f5bc: 31 d2 xor %edx,%edx
11f5be: 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);
11f5c1: 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;
11f5c3: 8b 45 14 mov 0x14(%ebp),%eax
11f5c6: c7 00 00 00 00 00 movl $0x0,(%eax)
*new_size = 0;
11f5cc: 8b 55 18 mov 0x18(%ebp),%edx
11f5cf: 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;
11f5d5: 39 4b 20 cmp %ecx,0x20(%ebx)
11f5d8: 77 05 ja 11f5df <_Heap_Resize_block+0x37>
11f5da: 39 4b 24 cmp %ecx,0x24(%ebx)
11f5dd: 73 0d jae 11f5ec <_Heap_Resize_block+0x44>
new_alloc_size,
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
11f5df: b8 02 00 00 00 mov $0x2,%eax
}
11f5e4: 8d 65 f4 lea -0xc(%ebp),%esp
11f5e7: 5b pop %ebx
11f5e8: 5e pop %esi
11f5e9: 5f pop %edi
11f5ea: c9 leave
11f5eb: 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;
11f5ec: 8b 41 04 mov 0x4(%ecx),%eax
11f5ef: 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;
11f5f2: 8d 3c 01 lea (%ecx,%eax,1),%edi
11f5f5: 89 7d d4 mov %edi,-0x2c(%ebp)
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
11f5f8: 89 fa mov %edi,%edx
11f5fa: 29 f2 sub %esi,%edx
11f5fc: 83 c2 04 add $0x4,%edx
11f5ff: 89 55 e0 mov %edx,-0x20(%ebp)
11f602: 8b 57 04 mov 0x4(%edi),%edx
11f605: 83 e2 fe and $0xfffffffe,%edx
11f608: 89 55 d0 mov %edx,-0x30(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
11f60b: f6 44 17 04 01 testb $0x1,0x4(%edi,%edx,1)
11f610: 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;
11f614: 8b 55 e0 mov -0x20(%ebp),%edx
11f617: 8b 7d 14 mov 0x14(%ebp),%edi
11f61a: 89 17 mov %edx,(%edi)
if ( next_block_is_free ) {
11f61c: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
11f620: 75 6e jne 11f690 <_Heap_Resize_block+0xe8>
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
11f622: 8b 55 e0 mov -0x20(%ebp),%edx
11f625: 39 55 10 cmp %edx,0x10(%ebp)
11f628: 77 79 ja 11f6a3 <_Heap_Resize_block+0xfb>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
11f62a: 80 7d df 00 cmpb $0x0,-0x21(%ebp)
11f62e: 74 31 je 11f661 <_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;
11f630: 8b 79 04 mov 0x4(%ecx),%edi
11f633: 83 e7 01 and $0x1,%edi
block->size_and_flag = size | flag;
11f636: 09 c7 or %eax,%edi
11f638: 89 79 04 mov %edi,0x4(%ecx)
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
}
11f63b: 8b 7d d4 mov -0x2c(%ebp),%edi
11f63e: 8b 7f 08 mov 0x8(%edi),%edi
11f641: 89 7d e4 mov %edi,-0x1c(%ebp)
11f644: 8b 55 d4 mov -0x2c(%ebp),%edx
11f647: 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;
11f64a: 8b 55 e4 mov -0x1c(%ebp),%edx
11f64d: 89 57 08 mov %edx,0x8(%edi)
next->prev = prev;
11f650: 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;
11f653: 83 4c 01 04 01 orl $0x1,0x4(%ecx,%eax,1)
/* Statistics */
--stats->free_blocks;
11f658: ff 4b 38 decl 0x38(%ebx)
stats->free_size -= next_block_size;
11f65b: 8b 7d d0 mov -0x30(%ebp),%edi
11f65e: 29 7b 30 sub %edi,0x30(%ebx)
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
11f661: ff 75 10 pushl 0x10(%ebp)
11f664: 56 push %esi
11f665: 51 push %ecx
11f666: 53 push %ebx
11f667: e8 dc d1 fe ff call 10c848 <_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;
11f66c: 8b 50 04 mov 0x4(%eax),%edx
11f66f: 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_ALLOC_BONUS;
11f672: 29 f0 sub %esi,%eax
11f674: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax
11f678: 8b 55 18 mov 0x18(%ebp),%edx
11f67b: 89 02 mov %eax,(%edx)
/* Statistics */
++stats->resizes;
11f67d: ff 43 54 incl 0x54(%ebx)
11f680: 83 c4 10 add $0x10,%esp
return HEAP_RESIZE_SUCCESSFUL;
11f683: 31 c0 xor %eax,%eax
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
}
11f685: 8d 65 f4 lea -0xc(%ebp),%esp
11f688: 5b pop %ebx
11f689: 5e pop %esi
11f68a: 5f pop %edi
11f68b: c9 leave
11f68c: c3 ret
11f68d: 8d 76 00 lea 0x0(%esi),%esi
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
11f690: 03 45 d0 add -0x30(%ebp),%eax
alloc_size += next_block_size;
11f693: 8b 7d d0 mov -0x30(%ebp),%edi
11f696: 01 fa add %edi,%edx
11f698: 89 55 e0 mov %edx,-0x20(%ebp)
}
if ( new_alloc_size > alloc_size ) {
11f69b: 8b 55 e0 mov -0x20(%ebp),%edx
11f69e: 39 55 10 cmp %edx,0x10(%ebp)
11f6a1: 76 87 jbe 11f62a <_Heap_Resize_block+0x82>
return HEAP_RESIZE_UNSATISFIED;
11f6a3: b8 01 00 00 00 mov $0x1,%eax
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
}
11f6a8: 8d 65 f4 lea -0xc(%ebp),%esp
11f6ab: 5b pop %ebx
11f6ac: 5e pop %esi
11f6ad: 5f pop %edi
11f6ae: c9 leave
11f6af: c3 ret
0011f6b0 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
11f6b0: 55 push %ebp
11f6b1: 89 e5 mov %esp,%ebp
11f6b3: 56 push %esi
11f6b4: 53 push %ebx
11f6b5: 8b 5d 08 mov 0x8(%ebp),%ebx
11f6b8: 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);
11f6bb: 8d 4e f8 lea -0x8(%esi),%ecx
11f6be: 89 f0 mov %esi,%eax
11f6c0: 31 d2 xor %edx,%edx
11f6c2: 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);
11f6c5: 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
11f6c7: 8b 43 20 mov 0x20(%ebx),%eax
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
11f6ca: 39 c1 cmp %eax,%ecx
11f6cc: 72 07 jb 11f6d5 <_Heap_Size_of_alloc_area+0x25>
11f6ce: 8b 53 24 mov 0x24(%ebx),%edx
11f6d1: 39 d1 cmp %edx,%ecx
11f6d3: 76 07 jbe 11f6dc <_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;
11f6d5: 31 c0 xor %eax,%eax
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
11f6d7: 5b pop %ebx
11f6d8: 5e pop %esi
11f6d9: c9 leave
11f6da: c3 ret
11f6db: 90 nop
- 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;
11f6dc: 8b 59 04 mov 0x4(%ecx),%ebx
11f6df: 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);
11f6e2: 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;
11f6e4: 39 c8 cmp %ecx,%eax
11f6e6: 77 ed ja 11f6d5 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
11f6e8: 39 ca cmp %ecx,%edx
11f6ea: 72 e9 jb 11f6d5 <_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 )
11f6ec: f6 41 04 01 testb $0x1,0x4(%ecx)
11f6f0: 74 e3 je 11f6d5 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
11f6f2: 29 f1 sub %esi,%ecx
11f6f4: 8d 51 04 lea 0x4(%ecx),%edx
11f6f7: 8b 45 10 mov 0x10(%ebp),%eax
11f6fa: 89 10 mov %edx,(%eax)
return true;
11f6fc: b0 01 mov $0x1,%al
}
11f6fe: 5b pop %ebx
11f6ff: 5e pop %esi
11f700: c9 leave
11f701: 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 e0 a4 12 00 03 cmpl $0x3,0x12a4e0
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 e0 a4 12 00 03 cmpl $0x3,0x12a4e0
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 64 26 12 00 push $0x122664
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 ce 02 00 00 je 10d714 <_Heap_Walk+0x384>
- 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 80 27 12 00 push $0x122780 <== 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
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
10d47c: 53 push %ebx
10d47d: 68 1a 26 12 00 push $0x12261a
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 e9 25 12 00 push $0x1225e9
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 fc 25 12 00 push $0x1225fc
10d494: eb ce jmp 10d464 <_Heap_Walk+0xd4>
10d496: 66 90 xchg %ax,%ax
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
10d498: ff 75 d0 pushl -0x30(%ebp)
10d49b: 68 f8 26 12 00 push $0x1226f8
10d4a0: eb c2 jmp 10d464 <_Heap_Walk+0xd4>
10d4a2: 66 90 xchg %ax,%ax
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
10d4a4: ff 75 dc pushl -0x24(%ebp)
10d4a7: 68 1c 27 12 00 push $0x12271c
10d4ac: eb b6 jmp 10d464 <_Heap_Walk+0xd4>
10d4ae: 66 90 xchg %ax,%ax
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 73 08 mov 0x8(%ebx),%esi
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 f3 cmp %esi,%ebx
10d4bb: 74 65 je 10d522 <_Heap_Walk+0x192>
block = next_block;
} while ( block != first_block );
return true;
}
10d4bd: 8b 43 20 mov 0x20(%ebx),%eax
10d4c0: 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;
10d4c3: 39 f0 cmp %esi,%eax
10d4c5: 0f 87 55 02 00 00 ja 10d720 <_Heap_Walk+0x390> <== NEVER TAKEN
10d4cb: 8b 7b 24 mov 0x24(%ebx),%edi
10d4ce: 39 f7 cmp %esi,%edi
10d4d0: 0f 82 4a 02 00 00 jb 10d720 <_Heap_Walk+0x390> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d4d6: 8d 46 08 lea 0x8(%esi),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d4d9: 31 d2 xor %edx,%edx
10d4db: f7 75 c8 divl -0x38(%ebp)
);
return false;
}
if (
10d4de: 85 d2 test %edx,%edx
10d4e0: 0f 85 71 02 00 00 jne 10d757 <_Heap_Walk+0x3c7> <== 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;
10d4e6: 8b 46 04 mov 0x4(%esi),%eax
10d4e9: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d4ec: f6 44 06 04 01 testb $0x1,0x4(%esi,%eax,1)
10d4f1: 0f 85 6d 02 00 00 jne 10d764 <_Heap_Walk+0x3d4> <== NEVER TAKEN
10d4f7: 89 da mov %ebx,%edx
10d4f9: 8d 76 00 lea 0x0(%esi),%esi
);
return false;
}
if ( free_block->prev != prev_block ) {
10d4fc: 8b 46 0c mov 0xc(%esi),%eax
10d4ff: 39 d0 cmp %edx,%eax
10d501: 0f 85 6a 02 00 00 jne 10d771 <_Heap_Walk+0x3e1>
return false;
}
prev_block = free_block;
free_block = free_block->next;
10d507: 8b 4e 08 mov 0x8(%esi),%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 ) {
10d50a: 39 cb cmp %ecx,%ebx
10d50c: 74 1a je 10d528 <_Heap_Walk+0x198>
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;
10d50e: 39 4d d4 cmp %ecx,-0x2c(%ebp)
10d511: 0f 86 7d 01 00 00 jbe 10d694 <_Heap_Walk+0x304>
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
10d517: 51 push %ecx
10d518: 68 b0 27 12 00 push $0x1227b0
10d51d: e9 42 ff ff ff jmp 10d464 <_Heap_Walk+0xd4>
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 ) {
10d522: 8b 53 20 mov 0x20(%ebx),%edx
10d525: 89 55 d4 mov %edx,-0x2c(%ebp)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d528: 8b 7d dc mov -0x24(%ebp),%edi
10d52b: 8b 45 d4 mov -0x2c(%ebp),%eax
10d52e: 66 90 xchg %ax,%ax
- 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;
10d530: 8b 4d e4 mov -0x1c(%ebp),%ecx
10d533: 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);
10d536: 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;
10d539: 39 f0 cmp %esi,%eax
10d53b: 76 23 jbe 10d560 <_Heap_Walk+0x1d0> <== 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)(
10d53d: 83 ec 0c sub $0xc,%esp
10d540: 56 push %esi
10d541: 57 push %edi
10d542: 68 34 28 12 00 push $0x122834
10d547: 90 nop
10d548: 6a 01 push $0x1
10d54a: ff 75 0c pushl 0xc(%ebp)
10d54d: ff 55 d8 call *-0x28(%ebp)
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
10d550: 83 c4 20 add $0x20,%esp
10d553: 31 c0 xor %eax,%eax
block = next_block;
} while ( block != first_block );
return true;
}
10d555: 8d 65 f4 lea -0xc(%ebp),%esp
10d558: 5b pop %ebx
10d559: 5e pop %esi
10d55a: 5f pop %edi
10d55b: c9 leave
10d55c: c3 ret
10d55d: 8d 76 00 lea 0x0(%esi),%esi
10d560: 39 73 24 cmp %esi,0x24(%ebx)
10d563: 72 d8 jb 10d53d <_Heap_Walk+0x1ad>
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;
10d565: 3b 7d cc cmp -0x34(%ebp),%edi
10d568: 0f 95 45 d4 setne -0x2c(%ebp)
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d56c: 89 c8 mov %ecx,%eax
10d56e: 31 d2 xor %edx,%edx
10d570: f7 75 e0 divl -0x20(%ebp)
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
10d573: 85 d2 test %edx,%edx
10d575: 74 0a je 10d581 <_Heap_Walk+0x1f1>
10d577: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10d57b: 0f 85 a6 01 00 00 jne 10d727 <_Heap_Walk+0x397>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
10d581: 39 4d d0 cmp %ecx,-0x30(%ebp)
10d584: 76 0a jbe 10d590 <_Heap_Walk+0x200>
10d586: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10d58a: 0f 85 a6 01 00 00 jne 10d736 <_Heap_Walk+0x3a6> <== ALWAYS TAKEN
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
10d590: 39 f7 cmp %esi,%edi
10d592: 72 0a jb 10d59e <_Heap_Walk+0x20e>
10d594: 80 7d d4 00 cmpb $0x0,-0x2c(%ebp)
10d598: 0f 85 aa 01 00 00 jne 10d748 <_Heap_Walk+0x3b8>
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;
10d59e: 8b 55 e4 mov -0x1c(%ebp),%edx
10d5a1: 83 e2 01 and $0x1,%edx
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
10d5a4: f6 46 04 01 testb $0x1,0x4(%esi)
10d5a8: 74 4e je 10d5f8 <_Heap_Walk+0x268>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
10d5aa: 85 d2 test %edx,%edx
10d5ac: 74 2e je 10d5dc <_Heap_Walk+0x24c>
(*printer)(
10d5ae: 83 ec 0c sub $0xc,%esp
10d5b1: 51 push %ecx
10d5b2: 57 push %edi
10d5b3: 68 4b 26 12 00 push $0x12264b
10d5b8: 6a 00 push $0x0
10d5ba: ff 75 0c pushl 0xc(%ebp)
10d5bd: ff 55 d8 call *-0x28(%ebp)
10d5c0: 83 c4 20 add $0x20,%esp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
10d5c3: 39 75 dc cmp %esi,-0x24(%ebp)
10d5c6: 0f 84 fe fd ff ff je 10d3ca <_Heap_Walk+0x3a>
10d5cc: 8b 56 04 mov 0x4(%esi),%edx
10d5cf: 89 55 e4 mov %edx,-0x1c(%ebp)
10d5d2: 8b 43 20 mov 0x20(%ebx),%eax
10d5d5: 89 f7 mov %esi,%edi
10d5d7: e9 54 ff ff ff jmp 10d530 <_Heap_Walk+0x1a0>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
10d5dc: 83 ec 08 sub $0x8,%esp
10d5df: ff 37 pushl (%edi)
10d5e1: 51 push %ecx
10d5e2: 57 push %edi
10d5e3: 68 98 29 12 00 push $0x122998
10d5e8: 6a 00 push $0x0
10d5ea: ff 75 0c pushl 0xc(%ebp)
10d5ed: ff 55 d8 call *-0x28(%ebp)
10d5f0: 83 c4 20 add $0x20,%esp
10d5f3: eb ce jmp 10d5c3 <_Heap_Walk+0x233>
10d5f5: 8d 76 00 lea 0x0(%esi),%esi
block = next_block;
} while ( block != first_block );
return true;
}
10d5f8: 8b 43 08 mov 0x8(%ebx),%eax
10d5fb: 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 ?
10d5fe: 8b 47 08 mov 0x8(%edi),%eax
10d601: 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)(
10d604: 39 43 0c cmp %eax,0xc(%ebx)
10d607: 0f 84 cb 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)" : "")
10d60d: 39 c3 cmp %eax,%ebx
10d60f: 0f 84 db 00 00 00 je 10d6f0 <_Heap_Walk+0x360>
10d615: c7 45 c8 e9 24 12 00 movl $0x1224e9,-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 ?
10d61c: 8b 47 0c mov 0xc(%edi),%eax
10d61f: 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)(
10d622: 39 45 b4 cmp %eax,-0x4c(%ebp)
10d625: 0f 84 b9 00 00 00 je 10d6e4 <_Heap_Walk+0x354>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10d62b: 39 c3 cmp %eax,%ebx
10d62d: 0f 84 c9 00 00 00 je 10d6fc <_Heap_Walk+0x36c>
10d633: b8 e9 24 12 00 mov $0x1224e9,%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)(
10d638: 83 ec 0c sub $0xc,%esp
10d63b: ff 75 c8 pushl -0x38(%ebp)
10d63e: ff 75 e4 pushl -0x1c(%ebp)
10d641: 50 push %eax
10d642: ff 75 d4 pushl -0x2c(%ebp)
10d645: 51 push %ecx
10d646: 57 push %edi
10d647: 68 f4 28 12 00 push $0x1228f4
10d64c: 6a 00 push $0x0
10d64e: ff 75 0c pushl 0xc(%ebp)
10d651: 89 55 c4 mov %edx,-0x3c(%ebp)
10d654: 89 4d c0 mov %ecx,-0x40(%ebp)
10d657: 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 ) {
10d65a: 8b 06 mov (%esi),%eax
10d65c: 83 c4 30 add $0x30,%esp
10d65f: 8b 4d c0 mov -0x40(%ebp),%ecx
10d662: 39 c1 cmp %eax,%ecx
10d664: 8b 55 c4 mov -0x3c(%ebp),%edx
10d667: 75 5f jne 10d6c8 <_Heap_Walk+0x338>
);
return false;
}
if ( !prev_used ) {
10d669: 85 d2 test %edx,%edx
10d66b: 0f 84 97 00 00 00 je 10d708 <_Heap_Walk+0x378>
block = next_block;
} while ( block != first_block );
return true;
}
10d671: 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 ) {
10d674: 39 c3 cmp %eax,%ebx
10d676: 74 0f je 10d687 <_Heap_Walk+0x2f7> <== NEVER TAKEN
if ( free_block == block ) {
10d678: 39 c7 cmp %eax,%edi
10d67a: 0f 84 43 ff ff ff je 10d5c3 <_Heap_Walk+0x233>
return true;
}
free_block = free_block->next;
10d680: 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 ) {
10d683: 39 c3 cmp %eax,%ebx
10d685: 75 f1 jne 10d678 <_Heap_Walk+0x2e8>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
10d687: 57 push %edi
10d688: 68 c0 29 12 00 push $0x1229c0
10d68d: e9 d2 fd ff ff jmp 10d464 <_Heap_Walk+0xd4>
10d692: 66 90 xchg %ax,%ax
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;
10d694: 39 f9 cmp %edi,%ecx
10d696: 0f 87 7b fe ff ff ja 10d517 <_Heap_Walk+0x187> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
10d69c: 8d 41 08 lea 0x8(%ecx),%eax
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
10d69f: 31 d2 xor %edx,%edx
10d6a1: f7 75 c8 divl -0x38(%ebp)
);
return false;
}
if (
10d6a4: 85 d2 test %edx,%edx
10d6a6: 0f 85 ad 00 00 00 jne 10d759 <_Heap_Walk+0x3c9>
- 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;
10d6ac: 8b 41 04 mov 0x4(%ecx),%eax
10d6af: 83 e0 fe and $0xfffffffe,%eax
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d6b2: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1)
10d6b7: 0f 85 a9 00 00 00 jne 10d766 <_Heap_Walk+0x3d6>
10d6bd: 89 f2 mov %esi,%edx
10d6bf: 89 ce mov %ecx,%esi
10d6c1: e9 36 fe ff ff jmp 10d4fc <_Heap_Walk+0x16c>
10d6c6: 66 90 xchg %ax,%ax
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
10d6c8: 52 push %edx
10d6c9: 56 push %esi
10d6ca: 50 push %eax
10d6cb: 51 push %ecx
10d6cc: 57 push %edi
10d6cd: 68 2c 29 12 00 push $0x12292c
10d6d2: e9 71 fe ff ff jmp 10d548 <_Heap_Walk+0x1b8>
10d6d7: 90 nop
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)(
10d6d8: c7 45 c8 b6 25 12 00 movl $0x1225b6,-0x38(%ebp)
10d6df: e9 38 ff ff ff jmp 10d61c <_Heap_Walk+0x28c>
10d6e4: b8 cf 25 12 00 mov $0x1225cf,%eax
10d6e9: e9 4a ff ff ff jmp 10d638 <_Heap_Walk+0x2a8>
10d6ee: 66 90 xchg %ax,%ax
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
10d6f0: c7 45 c8 c5 25 12 00 movl $0x1225c5,-0x38(%ebp)
10d6f7: e9 20 ff ff ff jmp 10d61c <_Heap_Walk+0x28c>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
10d6fc: b8 df 25 12 00 mov $0x1225df,%eax
10d701: e9 32 ff ff ff jmp 10d638 <_Heap_Walk+0x2a8>
10d706: 66 90 xchg %ax,%ax
return false;
}
if ( !prev_used ) {
(*printer)(
10d708: 57 push %edi
10d709: 68 68 29 12 00 push $0x122968
10d70e: e9 51 fd ff ff jmp 10d464 <_Heap_Walk+0xd4>
10d713: 90 nop
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
10d714: 56 push %esi
10d715: 68 50 27 12 00 push $0x122750
10d71a: e9 45 fd ff ff jmp 10d464 <_Heap_Walk+0xd4>
10d71f: 90 nop
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;
10d720: 89 f1 mov %esi,%ecx <== NOT EXECUTED
10d722: e9 f0 fd ff ff jmp 10d517 <_Heap_Walk+0x187> <== NOT EXECUTED
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
10d727: 83 ec 0c sub $0xc,%esp
10d72a: 51 push %ecx
10d72b: 57 push %edi
10d72c: 68 64 28 12 00 push $0x122864
10d731: e9 12 fe ff ff jmp 10d548 <_Heap_Walk+0x1b8>
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
10d736: 83 ec 08 sub $0x8,%esp
10d739: ff 75 d0 pushl -0x30(%ebp)
10d73c: 51 push %ecx
10d73d: 57 push %edi
10d73e: 68 94 28 12 00 push $0x122894
10d743: e9 00 fe ff ff jmp 10d548 <_Heap_Walk+0x1b8>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
10d748: 83 ec 0c sub $0xc,%esp
10d74b: 56 push %esi
10d74c: 57 push %edi
10d74d: 68 c0 28 12 00 push $0x1228c0
10d752: e9 f1 fd ff ff jmp 10d548 <_Heap_Walk+0x1b8>
);
return false;
}
if (
10d757: 89 f1 mov %esi,%ecx <== NOT EXECUTED
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
10d759: 51 push %ecx
10d75a: 68 d0 27 12 00 push $0x1227d0
10d75f: e9 00 fd ff ff jmp 10d464 <_Heap_Walk+0xd4>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
10d764: 89 f1 mov %esi,%ecx <== NOT EXECUTED
(*printer)(
10d766: 51 push %ecx
10d767: 68 2f 26 12 00 push $0x12262f
10d76c: e9 f3 fc ff ff jmp 10d464 <_Heap_Walk+0xd4>
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
10d771: 83 ec 0c sub $0xc,%esp
10d774: 50 push %eax
10d775: 56 push %esi
10d776: 68 00 28 12 00 push $0x122800
10d77b: e9 c8 fd ff ff jmp 10d548 <_Heap_Walk+0x1b8>
0010bde8 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
10bde8: 55 push %ebp
10bde9: 89 e5 mov %esp,%ebp
10bdeb: 53 push %ebx
10bdec: 83 ec 04 sub $0x4,%esp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10bdef: 8b 0d c0 88 12 00 mov 0x1288c0,%ecx
10bdf5: 85 c9 test %ecx,%ecx
10bdf7: 74 1a je 10be13 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN
10bdf9: 31 db xor %ebx,%ebx
10bdfb: 90 nop
(void) rtems_io_initialize( major, 0, NULL );
10bdfc: 52 push %edx
10bdfd: 6a 00 push $0x0
10bdff: 6a 00 push $0x0
10be01: 53 push %ebx
10be02: e8 9d 52 00 00 call 1110a4 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
10be07: 43 inc %ebx
10be08: 83 c4 10 add $0x10,%esp
10be0b: 39 1d c0 88 12 00 cmp %ebx,0x1288c0
10be11: 77 e9 ja 10bdfc <_IO_Initialize_all_drivers+0x14>
(void) rtems_io_initialize( major, 0, NULL );
}
10be13: 8b 5d fc mov -0x4(%ebp),%ebx
10be16: c9 leave
10be17: c3 ret
0010bd50 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
10bd50: 55 push %ebp
10bd51: 89 e5 mov %esp,%ebp
10bd53: 57 push %edi
10bd54: 56 push %esi
10bd55: 53 push %ebx
10bd56: 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;
10bd59: 8b 1d 74 3b 12 00 mov 0x123b74,%ebx
drivers_in_table = Configuration.number_of_device_drivers;
10bd5f: a1 70 3b 12 00 mov 0x123b70,%eax
10bd64: 89 45 e4 mov %eax,-0x1c(%ebp)
number_of_drivers = Configuration.maximum_drivers;
10bd67: 8b 35 6c 3b 12 00 mov 0x123b6c,%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 )
10bd6d: 39 f0 cmp %esi,%eax
10bd6f: 73 5f jae 10bdd0 <_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(
10bd71: 8d 0c 76 lea (%esi,%esi,2),%ecx
10bd74: c1 e1 03 shl $0x3,%ecx
10bd77: 83 ec 0c sub $0xc,%esp
10bd7a: 51 push %ecx
10bd7b: 89 4d dc mov %ecx,-0x24(%ebp)
10bd7e: e8 95 2c 00 00 call 10ea18 <_Workspace_Allocate_or_fatal_error>
10bd83: 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 *)
10bd85: a3 c4 88 12 00 mov %eax,0x1288c4
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
10bd8a: 89 35 c0 88 12 00 mov %esi,0x1288c0
memset(
10bd90: 31 c0 xor %eax,%eax
10bd92: 8b 4d dc mov -0x24(%ebp),%ecx
10bd95: 89 d7 mov %edx,%edi
10bd97: 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++ )
10bd99: 83 c4 10 add $0x10,%esp
10bd9c: 8b 45 e4 mov -0x1c(%ebp),%eax
10bd9f: 85 c0 test %eax,%eax
10bda1: 74 25 je 10bdc8 <_IO_Manager_initialization+0x78><== NEVER TAKEN
10bda3: a1 c4 88 12 00 mov 0x1288c4,%eax
10bda8: 89 45 e0 mov %eax,-0x20(%ebp)
10bdab: 31 c0 xor %eax,%eax
10bdad: 31 d2 xor %edx,%edx
10bdaf: 90 nop
_IO_Driver_address_table[index] = driver_table[index];
10bdb0: 8b 7d e0 mov -0x20(%ebp),%edi
10bdb3: 01 c7 add %eax,%edi
10bdb5: 8d 34 03 lea (%ebx,%eax,1),%esi
10bdb8: b9 06 00 00 00 mov $0x6,%ecx
10bdbd: 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++ )
10bdbf: 42 inc %edx
10bdc0: 83 c0 18 add $0x18,%eax
10bdc3: 39 55 e4 cmp %edx,-0x1c(%ebp)
10bdc6: 77 e8 ja 10bdb0 <_IO_Manager_initialization+0x60>
_IO_Driver_address_table[index] = driver_table[index];
}
10bdc8: 8d 65 f4 lea -0xc(%ebp),%esp
10bdcb: 5b pop %ebx
10bdcc: 5e pop %esi
10bdcd: 5f pop %edi
10bdce: c9 leave
10bdcf: 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;
10bdd0: 89 1d c4 88 12 00 mov %ebx,0x1288c4
_IO_Number_of_drivers = number_of_drivers;
10bdd6: 8b 45 e4 mov -0x1c(%ebp),%eax
10bdd9: a3 c0 88 12 00 mov %eax,0x1288c0
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
10bdde: 8d 65 f4 lea -0xc(%ebp),%esp
10bde1: 5b pop %ebx
10bde2: 5e pop %esi
10bde3: 5f pop %edi
10bde4: c9 leave
10bde5: c3 ret
0010c93c <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10c93c: 55 push %ebp
10c93d: 89 e5 mov %esp,%ebp
10c93f: 53 push %ebx
10c940: 83 ec 08 sub $0x8,%esp
10c943: 8b 45 08 mov 0x8(%ebp),%eax
10c946: 8b 55 0c mov 0xc(%ebp),%edx
10c949: 8b 5d 10 mov 0x10(%ebp),%ebx
_Internal_errors_What_happened.the_source = the_source;
10c94c: a3 f4 7e 12 00 mov %eax,0x127ef4
_Internal_errors_What_happened.is_internal = is_internal;
10c951: 88 15 f8 7e 12 00 mov %dl,0x127ef8
_Internal_errors_What_happened.the_error = the_error;
10c957: 89 1d fc 7e 12 00 mov %ebx,0x127efc
_User_extensions_Fatal( the_source, is_internal, the_error );
10c95d: 53 push %ebx
10c95e: 0f b6 d2 movzbl %dl,%edx
10c961: 52 push %edx
10c962: 50 push %eax
10c963: e8 b0 1c 00 00 call 10e618 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
10c968: c7 05 e0 7f 12 00 05 movl $0x5,0x127fe0 <== NOT EXECUTED
10c96f: 00 00 00
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
10c972: fa cli <== NOT EXECUTED
10c973: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10c975: f4 hlt <== NOT EXECUTED
10c976: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c979: eb fe jmp 10c979 <_Internal_error_Occurred+0x3d><== NOT EXECUTED
00111690 <_Objects_API_maximum_class>:
#include <rtems/score/object.h>
unsigned int _Objects_API_maximum_class(
uint32_t api
)
{
111690: 55 push %ebp
111691: 89 e5 mov %esp,%ebp
111693: 8b 45 08 mov 0x8(%ebp),%eax
111696: 48 dec %eax
111697: 83 f8 02 cmp $0x2,%eax
11169a: 77 0c ja 1116a8 <_Objects_API_maximum_class+0x18>
11169c: 8b 04 85 60 1c 12 00 mov 0x121c60(,%eax,4),%eax
case OBJECTS_NO_API:
default:
break;
}
return 0;
}
1116a3: c9 leave
1116a4: c3 ret
1116a5: 8d 76 00 lea 0x0(%esi),%esi
#include <rtems/score/object.h>
unsigned int _Objects_API_maximum_class(
uint32_t api
)
{
1116a8: 31 c0 xor %eax,%eax
case OBJECTS_NO_API:
default:
break;
}
return 0;
}
1116aa: c9 leave
1116ab: c3 ret
0010c9cc <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
10c9cc: 55 push %ebp
10c9cd: 89 e5 mov %esp,%ebp
10c9cf: 56 push %esi
10c9d0: 53 push %ebx
10c9d1: 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 )
10c9d4: 8b 43 18 mov 0x18(%ebx),%eax
10c9d7: 85 c0 test %eax,%eax
10c9d9: 75 0d jne 10c9e8 <_Objects_Allocate+0x1c><== ALWAYS TAKEN
return NULL;
10c9db: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
);
}
#endif
return the_object;
}
10c9dd: 89 c8 mov %ecx,%eax
10c9df: 8d 65 f8 lea -0x8(%ebp),%esp
10c9e2: 5b pop %ebx
10c9e3: 5e pop %esi
10c9e4: c9 leave
10c9e5: c3 ret
10c9e6: 66 90 xchg %ax,%ax
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10c9e8: 8d 73 20 lea 0x20(%ebx),%esi
10c9eb: 83 ec 0c sub $0xc,%esp
10c9ee: 56 push %esi
10c9ef: e8 68 f6 ff ff call 10c05c <_Chain_Get>
10c9f4: 89 c1 mov %eax,%ecx
if ( information->auto_extend ) {
10c9f6: 83 c4 10 add $0x10,%esp
10c9f9: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10c9fd: 74 de je 10c9dd <_Objects_Allocate+0x11>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
10c9ff: 85 c0 test %eax,%eax
10ca01: 74 29 je 10ca2c <_Objects_Allocate+0x60>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
10ca03: 0f b7 41 08 movzwl 0x8(%ecx),%eax
10ca07: 0f b7 53 08 movzwl 0x8(%ebx),%edx
10ca0b: 29 d0 sub %edx,%eax
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
10ca0d: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10ca11: 31 d2 xor %edx,%edx
10ca13: f7 f6 div %esi
information->inactive_per_block[ block ]--;
10ca15: c1 e0 02 shl $0x2,%eax
10ca18: 03 43 30 add 0x30(%ebx),%eax
10ca1b: ff 08 decl (%eax)
information->inactive--;
10ca1d: 66 ff 4b 2c decw 0x2c(%ebx)
);
}
#endif
return the_object;
}
10ca21: 89 c8 mov %ecx,%eax
10ca23: 8d 65 f8 lea -0x8(%ebp),%esp
10ca26: 5b pop %ebx
10ca27: 5e pop %esi
10ca28: c9 leave
10ca29: c3 ret
10ca2a: 66 90 xchg %ax,%ax
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
10ca2c: 83 ec 0c sub $0xc,%esp
10ca2f: 53 push %ebx
10ca30: e8 3b 00 00 00 call 10ca70 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
10ca35: 89 34 24 mov %esi,(%esp)
10ca38: e8 1f f6 ff ff call 10c05c <_Chain_Get>
10ca3d: 89 c1 mov %eax,%ecx
}
if ( the_object ) {
10ca3f: 83 c4 10 add $0x10,%esp
10ca42: 85 c0 test %eax,%eax
10ca44: 74 97 je 10c9dd <_Objects_Allocate+0x11>
10ca46: eb bb jmp 10ca03 <_Objects_Allocate+0x37>
0010ca70 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
10ca70: 55 push %ebp
10ca71: 89 e5 mov %esp,%ebp
10ca73: 57 push %edi
10ca74: 56 push %esi
10ca75: 53 push %ebx
10ca76: 83 ec 4c sub $0x4c,%esp
10ca79: 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 );
10ca7c: 0f b7 43 08 movzwl 0x8(%ebx),%eax
10ca80: 89 45 cc mov %eax,-0x34(%ebp)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10ca83: 8b 4b 34 mov 0x34(%ebx),%ecx
10ca86: 85 c9 test %ecx,%ecx
10ca88: 0f 84 62 02 00 00 je 10ccf0 <_Objects_Extend_information+0x280>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
10ca8e: 8b 73 10 mov 0x10(%ebx),%esi
10ca91: 66 89 75 d0 mov %si,-0x30(%ebp)
10ca95: 8b 7b 14 mov 0x14(%ebx),%edi
10ca98: 89 f0 mov %esi,%eax
10ca9a: 31 d2 xor %edx,%edx
10ca9c: 66 f7 f7 div %di
10ca9f: 0f b7 f0 movzwl %ax,%esi
for ( ; block < block_count; block++ ) {
10caa2: 85 f6 test %esi,%esi
10caa4: 0f 84 5f 02 00 00 je 10cd09 <_Objects_Extend_information+0x299><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL ) {
10caaa: 8b 01 mov (%ecx),%eax
10caac: 85 c0 test %eax,%eax
10caae: 0f 84 67 02 00 00 je 10cd1b <_Objects_Extend_information+0x2ab><== NEVER TAKEN
10cab4: 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 );
10cab7: 8b 55 cc mov -0x34(%ebp),%edx
10caba: 89 55 d4 mov %edx,-0x2c(%ebp)
index_base = minimum_index;
block = 0;
10cabd: 31 d2 xor %edx,%edx
10cabf: 8b 45 d4 mov -0x2c(%ebp),%eax
10cac2: eb 0a jmp 10cace <_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 ) {
10cac4: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4)
10cac8: 0f 84 c2 01 00 00 je 10cc90 <_Objects_Extend_information+0x220>
do_extend = false;
break;
} else
index_base += information->allocation_size;
10cace: 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++ ) {
10cad0: 42 inc %edx
10cad1: 39 d6 cmp %edx,%esi
10cad3: 77 ef ja 10cac4 <_Objects_Extend_information+0x54>
10cad5: 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;
10cad8: b1 01 mov $0x1,%cl
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
10cada: 0f b7 45 d0 movzwl -0x30(%ebp),%eax
10cade: 01 f8 add %edi,%eax
10cae0: 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 ) {
10cae3: 3d ff ff 00 00 cmp $0xffff,%eax
10cae8: 0f 87 9a 01 00 00 ja 10cc88 <_Objects_Extend_information+0x218><== 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;
10caee: 0f af 7b 18 imul 0x18(%ebx),%edi
if ( information->auto_extend ) {
10caf2: 80 7b 12 00 cmpb $0x0,0x12(%ebx)
10caf6: 0f 84 a0 01 00 00 je 10cc9c <_Objects_Extend_information+0x22c>
new_object_block = _Workspace_Allocate( block_size );
10cafc: 83 ec 0c sub $0xc,%esp
10caff: 57 push %edi
10cb00: 89 55 b8 mov %edx,-0x48(%ebp)
10cb03: 88 4d b4 mov %cl,-0x4c(%ebp)
10cb06: e8 d9 1e 00 00 call 10e9e4 <_Workspace_Allocate>
10cb0b: 89 45 c8 mov %eax,-0x38(%ebp)
if ( !new_object_block )
10cb0e: 83 c4 10 add $0x10,%esp
10cb11: 85 c0 test %eax,%eax
10cb13: 8b 55 b8 mov -0x48(%ebp),%edx
10cb16: 8a 4d b4 mov -0x4c(%ebp),%cl
10cb19: 0f 84 69 01 00 00 je 10cc88 <_Objects_Extend_information+0x218>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
10cb1f: 84 c9 test %cl,%cl
10cb21: 0f 84 e6 00 00 00 je 10cc0d <_Objects_Extend_information+0x19d>
*/
/*
* Up the block count and maximum
*/
block_count++;
10cb27: 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 );
10cb2a: 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 *)) +
10cb2d: 8d 04 7f lea (%edi,%edi,2),%eax
((maximum + minimum_index) * sizeof(Objects_Control *));
10cb30: 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 *)) +
10cb33: 03 45 cc add -0x34(%ebp),%eax
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
10cb36: 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 );
10cb39: 50 push %eax
10cb3a: 89 55 b8 mov %edx,-0x48(%ebp)
10cb3d: e8 a2 1e 00 00 call 10e9e4 <_Workspace_Allocate>
10cb42: 89 45 c4 mov %eax,-0x3c(%ebp)
if ( !object_blocks ) {
10cb45: 83 c4 10 add $0x10,%esp
10cb48: 85 c0 test %eax,%eax
10cb4a: 8b 55 b8 mov -0x48(%ebp),%edx
10cb4d: 0f 84 da 01 00 00 je 10cd2d <_Objects_Extend_information+0x2bd>
10cb53: 8b 45 c4 mov -0x3c(%ebp),%eax
10cb56: 8d 04 b8 lea (%eax,%edi,4),%eax
10cb59: 89 45 bc mov %eax,-0x44(%ebp)
10cb5c: 8b 4d c4 mov -0x3c(%ebp),%ecx
10cb5f: 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 ) {
10cb62: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10cb66: 39 4d cc cmp %ecx,-0x34(%ebp)
10cb69: 0f 82 4d 01 00 00 jb 10ccbc <_Objects_Extend_information+0x24c>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
10cb6f: 8b 4d cc mov -0x34(%ebp),%ecx
10cb72: 85 c9 test %ecx,%ecx
10cb74: 74 12 je 10cb88 <_Objects_Extend_information+0x118><== NEVER TAKEN
10cb76: 31 c9 xor %ecx,%ecx
10cb78: 8b 7d cc mov -0x34(%ebp),%edi
10cb7b: 90 nop
local_table[ index ] = NULL;
10cb7c: 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++ ) {
10cb83: 41 inc %ecx
10cb84: 39 cf cmp %ecx,%edi
10cb86: 77 f4 ja 10cb7c <_Objects_Extend_information+0x10c><== NEVER TAKEN
10cb88: c1 e6 02 shl $0x2,%esi
10cb8b: 89 75 c0 mov %esi,-0x40(%ebp)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
10cb8e: 8b 4d c4 mov -0x3c(%ebp),%ecx
10cb91: 8b 75 c0 mov -0x40(%ebp),%esi
10cb94: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1)
inactive_per_block[block_count] = 0;
10cb9b: 8b 4d bc mov -0x44(%ebp),%ecx
10cb9e: c7 04 31 00 00 00 00 movl $0x0,(%ecx,%esi,1)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
10cba5: 0f b7 73 14 movzwl 0x14(%ebx),%esi
10cba9: 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 ;
10cbac: 39 75 d4 cmp %esi,-0x2c(%ebp)
10cbaf: 73 0f jae 10cbc0 <_Objects_Extend_information+0x150><== NEVER TAKEN
10cbb1: 8b 4d d4 mov -0x2c(%ebp),%ecx
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
10cbb4: 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++ ) {
10cbbb: 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 ;
10cbbc: 39 f1 cmp %esi,%ecx
10cbbe: 72 f4 jb 10cbb4 <_Objects_Extend_information+0x144>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
10cbc0: 9c pushf
10cbc1: fa cli
10cbc2: 5f pop %edi
old_tables = information->object_blocks;
10cbc3: 8b 73 34 mov 0x34(%ebx),%esi
information->object_blocks = object_blocks;
10cbc6: 8b 4d c4 mov -0x3c(%ebp),%ecx
10cbc9: 89 4b 34 mov %ecx,0x34(%ebx)
information->inactive_per_block = inactive_per_block;
10cbcc: 8b 4d bc mov -0x44(%ebp),%ecx
10cbcf: 89 4b 30 mov %ecx,0x30(%ebx)
information->local_table = local_table;
10cbd2: 89 43 1c mov %eax,0x1c(%ebx)
information->maximum = (Objects_Maximum) maximum;
10cbd5: 8b 45 d0 mov -0x30(%ebp),%eax
10cbd8: 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) |
10cbdc: 8b 0b mov (%ebx),%ecx
10cbde: c1 e1 18 shl $0x18,%ecx
10cbe1: 81 c9 00 00 01 00 or $0x10000,%ecx
information->maximum_id = _Objects_Build_id(
10cbe7: 0f b7 43 04 movzwl 0x4(%ebx),%eax
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10cbeb: c1 e0 1b shl $0x1b,%eax
10cbee: 09 c1 or %eax,%ecx
10cbf0: 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) |
10cbf4: 09 c1 or %eax,%ecx
10cbf6: 89 4b 0c mov %ecx,0xc(%ebx)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
10cbf9: 57 push %edi
10cbfa: 9d popf
_Workspace_Free( old_tables );
10cbfb: 83 ec 0c sub $0xc,%esp
10cbfe: 56 push %esi
10cbff: 89 55 b8 mov %edx,-0x48(%ebp)
10cc02: e8 f9 1d 00 00 call 10ea00 <_Workspace_Free>
10cc07: 83 c4 10 add $0x10,%esp
10cc0a: 8b 55 b8 mov -0x48(%ebp),%edx
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
10cc0d: c1 e2 02 shl $0x2,%edx
10cc10: 89 55 d0 mov %edx,-0x30(%ebp)
10cc13: 8b 43 34 mov 0x34(%ebx),%eax
10cc16: 8b 4d c8 mov -0x38(%ebp),%ecx
10cc19: 89 0c 10 mov %ecx,(%eax,%edx,1)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
10cc1c: ff 73 18 pushl 0x18(%ebx)
10cc1f: 0f b7 43 14 movzwl 0x14(%ebx),%eax
10cc23: 50 push %eax
10cc24: 51 push %ecx
10cc25: 8d 7d dc lea -0x24(%ebp),%edi
10cc28: 57 push %edi
10cc29: e8 b6 44 00 00 call 1110e4 <_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 ) {
10cc2e: 83 c4 10 add $0x10,%esp
10cc31: 8b 75 d4 mov -0x2c(%ebp),%esi
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cc34: 8d 43 20 lea 0x20(%ebx),%eax
10cc37: 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 ) {
10cc3a: eb 29 jmp 10cc65 <_Objects_Extend_information+0x1f5>
10cc3c: 8b 13 mov (%ebx),%edx
10cc3e: c1 e2 18 shl $0x18,%edx
10cc41: 81 ca 00 00 01 00 or $0x10000,%edx
the_object->id = _Objects_Build_id(
10cc47: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
10cc4b: c1 e1 1b shl $0x1b,%ecx
10cc4e: 09 ca or %ecx,%edx
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
10cc50: 09 f2 or %esi,%edx
10cc52: 89 50 08 mov %edx,0x8(%eax)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
10cc55: 83 ec 08 sub $0x8,%esp
10cc58: 50 push %eax
10cc59: ff 75 d4 pushl -0x2c(%ebp)
10cc5c: e8 bf f3 ff ff call 10c020 <_Chain_Append>
index++;
10cc61: 46 inc %esi
10cc62: 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 ) {
10cc65: 83 ec 0c sub $0xc,%esp
10cc68: 57 push %edi
10cc69: e8 ee f3 ff ff call 10c05c <_Chain_Get>
10cc6e: 83 c4 10 add $0x10,%esp
10cc71: 85 c0 test %eax,%eax
10cc73: 75 c7 jne 10cc3c <_Objects_Extend_information+0x1cc>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
10cc75: 8b 43 14 mov 0x14(%ebx),%eax
10cc78: 8b 53 30 mov 0x30(%ebx),%edx
10cc7b: 0f b7 c8 movzwl %ax,%ecx
10cc7e: 8b 75 d0 mov -0x30(%ebp),%esi
10cc81: 89 0c 32 mov %ecx,(%edx,%esi,1)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
10cc84: 66 01 43 2c add %ax,0x2c(%ebx)
}
10cc88: 8d 65 f4 lea -0xc(%ebp),%esp
10cc8b: 5b pop %ebx
10cc8c: 5e pop %esi
10cc8d: 5f pop %edi
10cc8e: c9 leave
10cc8f: c3 ret
10cc90: 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;
10cc93: 31 c9 xor %ecx,%ecx
10cc95: e9 40 fe ff ff jmp 10cada <_Objects_Extend_information+0x6a>
10cc9a: 66 90 xchg %ax,%ax
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 );
10cc9c: 83 ec 0c sub $0xc,%esp
10cc9f: 57 push %edi
10cca0: 89 55 b8 mov %edx,-0x48(%ebp)
10cca3: 88 4d b4 mov %cl,-0x4c(%ebp)
10cca6: e8 6d 1d 00 00 call 10ea18 <_Workspace_Allocate_or_fatal_error>
10ccab: 89 45 c8 mov %eax,-0x38(%ebp)
10ccae: 83 c4 10 add $0x10,%esp
10ccb1: 8a 4d b4 mov -0x4c(%ebp),%cl
10ccb4: 8b 55 b8 mov -0x48(%ebp),%edx
10ccb7: e9 63 fe ff ff jmp 10cb1f <_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,
10ccbc: c1 e6 02 shl $0x2,%esi
10ccbf: 89 75 c0 mov %esi,-0x40(%ebp)
10ccc2: 8b 73 34 mov 0x34(%ebx),%esi
10ccc5: 8b 7d c4 mov -0x3c(%ebp),%edi
10ccc8: 8b 4d c0 mov -0x40(%ebp),%ecx
10cccb: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
10cccd: 8b 73 30 mov 0x30(%ebx),%esi
10ccd0: 8b 7d bc mov -0x44(%ebp),%edi
10ccd3: 8b 4d c0 mov -0x40(%ebp),%ecx
10ccd6: 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 *) );
10ccd8: 0f b7 4b 10 movzwl 0x10(%ebx),%ecx
10ccdc: 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,
10ccdf: c1 e1 02 shl $0x2,%ecx
10cce2: 8b 73 1c mov 0x1c(%ebx),%esi
10cce5: 89 c7 mov %eax,%edi
10cce7: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10cce9: e9 a0 fe ff ff jmp 10cb8e <_Objects_Extend_information+0x11e>
10ccee: 66 90 xchg %ax,%ax
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
10ccf0: 8b 53 10 mov 0x10(%ebx),%edx
10ccf3: 66 89 55 d0 mov %dx,-0x30(%ebp)
10ccf7: 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 );
10ccfb: 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;
10ccfe: b1 01 mov $0x1,%cl
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10cd00: 31 d2 xor %edx,%edx
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
10cd02: 31 f6 xor %esi,%esi
10cd04: e9 d1 fd ff ff jmp 10cada <_Objects_Extend_information+0x6a>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
10cd09: 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 );
10cd0c: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED
10cd0f: 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;
10cd12: b1 01 mov $0x1,%cl <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
10cd14: 31 d2 xor %edx,%edx <== NOT EXECUTED
10cd16: e9 bf fd ff ff jmp 10cada <_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 ) {
10cd1b: 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 );
10cd1e: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED
10cd21: 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;
10cd24: 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;
10cd26: 31 d2 xor %edx,%edx <== NOT EXECUTED
10cd28: e9 ad fd ff ff jmp 10cada <_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 );
10cd2d: 83 ec 0c sub $0xc,%esp
10cd30: ff 75 c8 pushl -0x38(%ebp)
10cd33: e8 c8 1c 00 00 call 10ea00 <_Workspace_Free>
return;
10cd38: 83 c4 10 add $0x10,%esp
10cd3b: e9 48 ff ff ff jmp 10cc88 <_Objects_Extend_information+0x218>
0010cdd0 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
10cdd0: 55 push %ebp
10cdd1: 89 e5 mov %esp,%ebp
10cdd3: 56 push %esi
10cdd4: 53 push %ebx
10cdd5: 8b 75 08 mov 0x8(%ebp),%esi
10cdd8: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
10cddb: 66 85 db test %bx,%bx
10cdde: 75 0c jne 10cdec <_Objects_Get_information+0x1c>
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;
10cde0: 31 c0 xor %eax,%eax
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
10cde2: 8d 65 f8 lea -0x8(%ebp),%esp
10cde5: 5b pop %ebx
10cde6: 5e pop %esi
10cde7: c9 leave
10cde8: c3 ret
10cde9: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
10cdec: 83 ec 0c sub $0xc,%esp
10cdef: 56 push %esi
10cdf0: e8 9b 48 00 00 call 111690 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
10cdf5: 83 c4 10 add $0x10,%esp
10cdf8: 85 c0 test %eax,%eax
10cdfa: 74 e4 je 10cde0 <_Objects_Get_information+0x10>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
10cdfc: 0f b7 db movzwl %bx,%ebx
10cdff: 39 d8 cmp %ebx,%eax
10ce01: 72 dd jb 10cde0 <_Objects_Get_information+0x10>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10ce03: 8b 14 b5 28 7e 12 00 mov 0x127e28(,%esi,4),%edx
return NULL;
10ce0a: 31 c0 xor %eax,%eax
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
10ce0c: 85 d2 test %edx,%edx
10ce0e: 74 d2 je 10cde2 <_Objects_Get_information+0x12><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
10ce10: 8b 04 9a mov (%edx,%ebx,4),%eax
if ( !info )
10ce13: 85 c0 test %eax,%eax
10ce15: 74 cb je 10cde2 <_Objects_Get_information+0x12><== 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;
10ce17: 31 d2 xor %edx,%edx
10ce19: 66 83 78 10 00 cmpw $0x0,0x10(%eax)
10ce1e: 0f 95 c2 setne %dl
10ce21: f7 da neg %edx
10ce23: 21 d0 and %edx,%eax
10ce25: eb bb jmp 10cde2 <_Objects_Get_information+0x12>
0010ce28 <_Objects_Get_isr_disable>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
10ce28: 55 push %ebp
10ce29: 89 e5 mov %esp,%ebp
10ce2b: 56 push %esi
10ce2c: 53 push %ebx
10ce2d: 8b 55 08 mov 0x8(%ebp),%edx
10ce30: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
10ce33: b8 01 00 00 00 mov $0x1,%eax
10ce38: 2b 42 08 sub 0x8(%edx),%eax
10ce3b: 03 45 0c add 0xc(%ebp),%eax
_ISR_Disable( level );
10ce3e: 9c pushf
10ce3f: fa cli
10ce40: 5e pop %esi
if ( information->maximum >= index ) {
10ce41: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
10ce45: 39 c8 cmp %ecx,%eax
10ce47: 77 1b ja 10ce64 <_Objects_Get_isr_disable+0x3c>
if ( (the_object = information->local_table[ index ]) != NULL ) {
10ce49: 8b 52 1c mov 0x1c(%edx),%edx
10ce4c: 8b 04 82 mov (%edx,%eax,4),%eax
10ce4f: 85 c0 test %eax,%eax
10ce51: 74 21 je 10ce74 <_Objects_Get_isr_disable+0x4c>
*location = OBJECTS_LOCAL;
10ce53: c7 03 00 00 00 00 movl $0x0,(%ebx)
*level_p = level;
10ce59: 8b 55 14 mov 0x14(%ebp),%edx
10ce5c: 89 32 mov %esi,(%edx)
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
10ce5e: 5b pop %ebx
10ce5f: 5e pop %esi
10ce60: c9 leave
10ce61: c3 ret
10ce62: 66 90 xchg %ax,%ax
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
return NULL;
}
_ISR_Enable( level );
10ce64: 56 push %esi
10ce65: 9d popf
*location = OBJECTS_ERROR;
10ce66: 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;
10ce6c: 31 c0 xor %eax,%eax
#endif
}
10ce6e: 5b pop %ebx
10ce6f: 5e pop %esi
10ce70: c9 leave
10ce71: c3 ret
10ce72: 66 90 xchg %ax,%ax
if ( (the_object = information->local_table[ index ]) != NULL ) {
*location = OBJECTS_LOCAL;
*level_p = level;
return the_object;
}
_ISR_Enable( level );
10ce74: 56 push %esi
10ce75: 9d popf
*location = OBJECTS_ERROR;
10ce76: c7 03 01 00 00 00 movl $0x1,(%ebx)
return NULL;
10ce7c: eb e0 jmp 10ce5e <_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
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 78 c0 12 00 mov 0x12c078,%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 f0 fe ff ff call 10e45c <_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 17 mov (%edi),%dl
10e5a3: 84 d2 test %dl,%dl
10e5a5: 74 68 je 10e60f <_Objects_Get_name_as_string+0xe3>
10e5a7: 89 d9 mov %ebx,%ecx
10e5a9: 31 c0 xor %eax,%eax
10e5ab: 89 5d d0 mov %ebx,-0x30(%ebp)
10e5ae: eb 07 jmp 10e5b7 <_Objects_Get_name_as_string+0x8b>
10e5b0: 8a 14 07 mov (%edi,%eax,1),%dl
10e5b3: 84 d2 test %dl,%dl
10e5b5: 74 21 je 10e5d8 <_Objects_Get_name_as_string+0xac>
*d = (isprint((unsigned char)*s)) ? *s : '*';
10e5b7: 0f b6 da movzbl %dl,%ebx
10e5ba: 8b 35 68 93 12 00 mov 0x129368,%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: b2 2a mov $0x2a,%dl
10e5cf: 88 11 mov %dl,(%ecx)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
10e5d1: 40 inc %eax
10e5d2: 41 inc %ecx
10e5d3: 3b 45 d4 cmp -0x2c(%ebp),%eax
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 b9 0b 00 00 call 10f19c <_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>
0010cfd8 <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
10cfd8: 55 push %ebp
10cfd9: 89 e5 mov %esp,%ebp
10cfdb: 57 push %edi
10cfdc: 56 push %esi
10cfdd: 53 push %ebx
10cfde: 83 ec 0c sub $0xc,%esp
10cfe1: 8b 5d 08 mov 0x8(%ebp),%ebx
10cfe4: 8b 75 0c mov 0xc(%ebp),%esi
10cfe7: 8b 7d 10 mov 0x10(%ebp),%edi
Objects_Control *object;
Objects_Id next_id;
if ( !information )
10cfea: 85 db test %ebx,%ebx
10cfec: 75 0a jne 10cff8 <_Objects_Get_next+0x20>
if ( !location_p )
return NULL;
if ( !next_id_p )
return NULL;
10cfee: 31 c0 xor %eax,%eax
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
10cff0: 8d 65 f4 lea -0xc(%ebp),%esp
10cff3: 5b pop %ebx
10cff4: 5e pop %esi
10cff5: 5f pop %edi
10cff6: c9 leave
10cff7: c3 ret
Objects_Id next_id;
if ( !information )
return NULL;
if ( !location_p )
10cff8: 85 ff test %edi,%edi
10cffa: 74 f2 je 10cfee <_Objects_Get_next+0x16>
return NULL;
if ( !next_id_p )
10cffc: 8b 45 14 mov 0x14(%ebp),%eax
10cfff: 85 c0 test %eax,%eax
10d001: 74 eb je 10cfee <_Objects_Get_next+0x16>
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
10d003: 66 85 f6 test %si,%si
10d006: 75 04 jne 10d00c <_Objects_Get_next+0x34>
next_id = information->minimum_id;
10d008: 8b 73 08 mov 0x8(%ebx),%esi
10d00b: 90 nop
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
10d00c: 66 39 73 10 cmp %si,0x10(%ebx)
10d010: 72 22 jb 10d034 <_Objects_Get_next+0x5c>
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
10d012: 51 push %ecx
10d013: 57 push %edi
10d014: 56 push %esi
10d015: 53 push %ebx
10d016: e8 2d 00 00 00 call 10d048 <_Objects_Get>
next_id++;
10d01b: 46 inc %esi
} while (*location_p != OBJECTS_LOCAL);
10d01c: 83 c4 10 add $0x10,%esp
10d01f: 8b 17 mov (%edi),%edx
10d021: 85 d2 test %edx,%edx
10d023: 75 e7 jne 10d00c <_Objects_Get_next+0x34>
*next_id_p = next_id;
10d025: 8b 55 14 mov 0x14(%ebp),%edx
10d028: 89 32 mov %esi,(%edx)
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
10d02a: 8d 65 f4 lea -0xc(%ebp),%esp
10d02d: 5b pop %ebx
10d02e: 5e pop %esi
10d02f: 5f pop %edi
10d030: c9 leave
10d031: c3 ret
10d032: 66 90 xchg %ax,%ax
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
{
*location_p = OBJECTS_ERROR;
10d034: c7 07 01 00 00 00 movl $0x1,(%edi)
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
10d03a: 8b 45 14 mov 0x14(%ebp),%eax
10d03d: c7 00 ff ff ff ff movl $0xffffffff,(%eax)
return 0;
10d043: 31 c0 xor %eax,%eax
10d045: eb a9 jmp 10cff0 <_Objects_Get_next+0x18>
0011b2fc <_Objects_Get_no_protection>:
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
11b2fc: 55 push %ebp
11b2fd: 89 e5 mov %esp,%ebp
11b2ff: 53 push %ebx
11b300: 8b 55 08 mov 0x8(%ebp),%edx
11b303: 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;
11b306: b8 01 00 00 00 mov $0x1,%eax
11b30b: 2b 42 08 sub 0x8(%edx),%eax
11b30e: 03 45 0c add 0xc(%ebp),%eax
if ( information->maximum >= index ) {
11b311: 0f b7 4a 10 movzwl 0x10(%edx),%ecx
11b315: 39 c8 cmp %ecx,%eax
11b317: 77 13 ja 11b32c <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
11b319: 8b 52 1c mov 0x1c(%edx),%edx
11b31c: 8b 04 82 mov (%edx,%eax,4),%eax
11b31f: 85 c0 test %eax,%eax
11b321: 74 09 je 11b32c <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
11b323: 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;
}
11b329: 5b pop %ebx
11b32a: c9 leave
11b32b: 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;
11b32c: c7 03 01 00 00 00 movl $0x1,(%ebx)
return NULL;
11b332: 31 c0 xor %eax,%eax
}
11b334: 5b pop %ebx
11b335: c9 leave
11b336: c3 ret
0010e12c <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
10e12c: 55 push %ebp
10e12d: 89 e5 mov %esp,%ebp
10e12f: 83 ec 18 sub $0x18,%esp
10e132: 8b 55 08 mov 0x8(%ebp),%edx
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10e135: 85 d2 test %edx,%edx
10e137: 75 08 jne 10e141 <_Objects_Id_to_name+0x15>
10e139: a1 18 b0 12 00 mov 0x12b018,%eax
10e13e: 8b 50 08 mov 0x8(%eax),%edx
10e141: 89 d0 mov %edx,%eax
10e143: c1 e8 18 shr $0x18,%eax
10e146: 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 )
10e149: 8d 48 ff lea -0x1(%eax),%ecx
10e14c: 83 f9 02 cmp $0x2,%ecx
10e14f: 77 1d ja 10e16e <_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 ] )
10e151: 8b 04 85 48 aa 12 00 mov 0x12aa48(,%eax,4),%eax
10e158: 85 c0 test %eax,%eax
10e15a: 74 12 je 10e16e <_Objects_Id_to_name+0x42>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10e15c: 89 d1 mov %edx,%ecx
10e15e: c1 e9 1b shr $0x1b,%ecx
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
10e161: 8b 04 88 mov (%eax,%ecx,4),%eax
if ( !information )
10e164: 85 c0 test %eax,%eax
10e166: 74 06 je 10e16e <_Objects_Id_to_name+0x42><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
10e168: 80 78 38 00 cmpb $0x0,0x38(%eax)
10e16c: 74 0a je 10e178 <_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;
10e16e: 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;
}
10e173: c9 leave
10e174: c3 ret
10e175: 8d 76 00 lea 0x0(%esi),%esi
#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 );
10e178: 51 push %ecx
10e179: 8d 4d f4 lea -0xc(%ebp),%ecx
10e17c: 51 push %ecx
10e17d: 52 push %edx
10e17e: 50 push %eax
10e17f: e8 40 ff ff ff call 10e0c4 <_Objects_Get>
if ( !the_object )
10e184: 83 c4 10 add $0x10,%esp
10e187: 85 c0 test %eax,%eax
10e189: 74 e3 je 10e16e <_Objects_Id_to_name+0x42>
return OBJECTS_INVALID_ID;
*name = the_object->name;
10e18b: 8b 50 0c mov 0xc(%eax),%edx
10e18e: 8b 45 0c mov 0xc(%ebp),%eax
10e191: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10e193: e8 24 0b 00 00 call 10ecbc <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10e198: 31 c0 xor %eax,%eax
}
10e19a: c9 leave
10e19b: c3 ret
001179f8 <_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
)
{
1179f8: 55 push %ebp
1179f9: 89 e5 mov %esp,%ebp
1179fb: 57 push %edi
1179fc: 56 push %esi
1179fd: 53 push %ebx
1179fe: 83 ec 1c sub $0x1c,%esp
117a01: 8b 7d 08 mov 0x8(%ebp),%edi
Objects_Control *the_object;
uint32_t index;
/* ASSERT: information->is_string == true */
if ( !id )
117a04: 8b 5d 10 mov 0x10(%ebp),%ebx
117a07: 85 db test %ebx,%ebx
117a09: 74 75 je 117a80 <_Objects_Name_to_id_string+0x88>
return OBJECTS_INVALID_ADDRESS;
if ( !name )
117a0b: 8b 4d 0c mov 0xc(%ebp),%ecx
117a0e: 85 c9 test %ecx,%ecx
117a10: 74 4b je 117a5d <_Objects_Name_to_id_string+0x65>
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
117a12: 8b 47 10 mov 0x10(%edi),%eax
117a15: 66 85 c0 test %ax,%ax
117a18: 74 43 je 117a5d <_Objects_Name_to_id_string+0x65>
for ( index = 1; index <= information->maximum; index++ ) {
117a1a: 0f b7 c0 movzwl %ax,%eax
117a1d: 89 45 e4 mov %eax,-0x1c(%ebp)
117a20: 8b 47 1c mov 0x1c(%edi),%eax
117a23: bb 01 00 00 00 mov $0x1,%ebx
117a28: 89 7d e0 mov %edi,-0x20(%ebp)
117a2b: 89 c7 mov %eax,%edi
117a2d: 8d 76 00 lea 0x0(%esi),%esi
the_object = information->local_table[ index ];
117a30: 8b 34 9f mov (%edi,%ebx,4),%esi
if ( !the_object )
117a33: 85 f6 test %esi,%esi
117a35: 74 20 je 117a57 <_Objects_Name_to_id_string+0x5f>
continue;
if ( !the_object->name.name_p )
117a37: 8b 46 0c mov 0xc(%esi),%eax
117a3a: 85 c0 test %eax,%eax
117a3c: 74 19 je 117a57 <_Objects_Name_to_id_string+0x5f>
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
117a3e: 52 push %edx
117a3f: 8b 4d e0 mov -0x20(%ebp),%ecx
117a42: 0f b7 51 3a movzwl 0x3a(%ecx),%edx
117a46: 52 push %edx
117a47: 50 push %eax
117a48: ff 75 0c pushl 0xc(%ebp)
117a4b: e8 9c 34 00 00 call 11aeec <strncmp>
117a50: 83 c4 10 add $0x10,%esp
117a53: 85 c0 test %eax,%eax
117a55: 74 15 je 117a6c <_Objects_Name_to_id_string+0x74>
if ( !name )
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
for ( index = 1; index <= information->maximum; index++ ) {
117a57: 43 inc %ebx
117a58: 3b 5d e4 cmp -0x1c(%ebp),%ebx
117a5b: 76 d3 jbe 117a30 <_Objects_Name_to_id_string+0x38>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
}
}
return OBJECTS_INVALID_NAME;
117a5d: b8 01 00 00 00 mov $0x1,%eax
}
117a62: 8d 65 f4 lea -0xc(%ebp),%esp
117a65: 5b pop %ebx
117a66: 5e pop %esi
117a67: 5f pop %edi
117a68: c9 leave
117a69: c3 ret
117a6a: 66 90 xchg %ax,%ax
if ( !the_object->name.name_p )
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
*id = the_object->id;
117a6c: 8b 46 08 mov 0x8(%esi),%eax
117a6f: 8b 55 10 mov 0x10(%ebp),%edx
117a72: 89 02 mov %eax,(%edx)
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
117a74: 31 c0 xor %eax,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
117a76: 8d 65 f4 lea -0xc(%ebp),%esp
117a79: 5b pop %ebx
117a7a: 5e pop %esi
117a7b: 5f pop %edi
117a7c: c9 leave
117a7d: c3 ret
117a7e: 66 90 xchg %ax,%ax
uint32_t index;
/* ASSERT: information->is_string == true */
if ( !id )
return OBJECTS_INVALID_ADDRESS;
117a80: b8 02 00 00 00 mov $0x2,%eax
}
}
}
return OBJECTS_INVALID_NAME;
}
117a85: 8d 65 f4 lea -0xc(%ebp),%esp
117a88: 5b pop %ebx
117a89: 5e pop %esi
117a8a: 5f pop %edi
117a8b: c9 leave
117a8c: c3 ret
0010d000 <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
10d000: 55 push %ebp
10d001: 89 e5 mov %esp,%ebp
10d003: 57 push %edi
10d004: 56 push %esi
10d005: 53 push %ebx
10d006: 8b 45 08 mov 0x8(%ebp),%eax
10d009: 8b 4d 0c mov 0xc(%ebp),%ecx
10d00c: 8b 55 10 mov 0x10(%ebp),%edx
10d00f: 8b 7d 14 mov 0x14(%ebp),%edi
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
10d012: 85 ff test %edi,%edi
10d014: 74 56 je 10d06c <_Objects_Name_to_id_u32+0x6c>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
10d016: 85 c9 test %ecx,%ecx
10d018: 74 08 je 10d022 <_Objects_Name_to_id_u32+0x22>
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10d01a: 8b 70 10 mov 0x10(%eax),%esi
10d01d: 66 85 f6 test %si,%si
10d020: 75 0a jne 10d02c <_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;
10d022: b8 01 00 00 00 mov $0x1,%eax
#endif
}
10d027: 5b pop %ebx
10d028: 5e pop %esi
10d029: 5f pop %edi
10d02a: c9 leave
10d02b: c3 ret
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
10d02c: 85 d2 test %edx,%edx
10d02e: 75 20 jne 10d050 <_Objects_Name_to_id_u32+0x50>
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
10d030: 0f b7 f6 movzwl %si,%esi
10d033: 8b 58 1c mov 0x1c(%eax),%ebx
10d036: b8 01 00 00 00 mov $0x1,%eax
10d03b: 90 nop
the_object = information->local_table[ index ];
10d03c: 8b 14 83 mov (%ebx,%eax,4),%edx
if ( !the_object )
10d03f: 85 d2 test %edx,%edx
10d041: 74 05 je 10d048 <_Objects_Name_to_id_u32+0x48>
continue;
if ( name == the_object->name.name_u32 ) {
10d043: 39 4a 0c cmp %ecx,0xc(%edx)
10d046: 74 18 je 10d060 <_Objects_Name_to_id_u32+0x60>
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
10d048: 40 inc %eax
10d049: 39 c6 cmp %eax,%esi
10d04b: 73 ef jae 10d03c <_Objects_Name_to_id_u32+0x3c>
10d04d: eb d3 jmp 10d022 <_Objects_Name_to_id_u32+0x22>
10d04f: 90 nop
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
(node == OBJECTS_SEARCH_ALL_NODES ||
10d050: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
10d056: 74 d8 je 10d030 <_Objects_Name_to_id_u32+0x30>
node == OBJECTS_SEARCH_LOCAL_NODE ||
10d058: 4a dec %edx
10d059: 75 c7 jne 10d022 <_Objects_Name_to_id_u32+0x22>
10d05b: eb d3 jmp 10d030 <_Objects_Name_to_id_u32+0x30>
10d05d: 8d 76 00 lea 0x0(%esi),%esi
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
10d060: 8b 42 08 mov 0x8(%edx),%eax
10d063: 89 07 mov %eax,(%edi)
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
10d065: 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
}
10d067: 5b pop %ebx
10d068: 5e pop %esi
10d069: 5f pop %edi
10d06a: c9 leave
10d06b: c3 ret
#endif
/* ASSERT: information->is_string == false */
if ( !id )
return OBJECTS_INVALID_ADDRESS;
10d06c: 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
}
10d071: 5b pop %ebx
10d072: 5e pop %esi
10d073: 5f pop %edi
10d074: c9 leave
10d075: c3 ret
0010d6e8 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
10d6e8: 55 push %ebp
10d6e9: 89 e5 mov %esp,%ebp
10d6eb: 57 push %edi
10d6ec: 56 push %esi
10d6ed: 53 push %ebx
10d6ee: 83 ec 14 sub $0x14,%esp
10d6f1: 8b 7d 08 mov 0x8(%ebp),%edi
10d6f4: 8b 5d 10 mov 0x10(%ebp),%ebx
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
10d6f7: 0f b7 47 3a movzwl 0x3a(%edi),%eax
10d6fb: 50 push %eax
10d6fc: 53 push %ebx
10d6fd: e8 96 79 00 00 call 115098 <strnlen>
10d702: 89 c6 mov %eax,%esi
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
10d704: 83 c4 10 add $0x10,%esp
10d707: 80 7f 38 00 cmpb $0x0,0x38(%edi)
10d70b: 75 57 jne 10d764 <_Objects_Set_name+0x7c>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10d70d: 0f be 13 movsbl (%ebx),%edx
10d710: c1 e2 18 shl $0x18,%edx
10d713: 83 f8 01 cmp $0x1,%eax
10d716: 76 38 jbe 10d750 <_Objects_Set_name+0x68>
10d718: 0f be 43 01 movsbl 0x1(%ebx),%eax
10d71c: c1 e0 10 shl $0x10,%eax
10d71f: 09 d0 or %edx,%eax
10d721: 83 fe 02 cmp $0x2,%esi
10d724: 74 31 je 10d757 <_Objects_Set_name+0x6f>
10d726: 0f be 53 02 movsbl 0x2(%ebx),%edx
10d72a: c1 e2 08 shl $0x8,%edx
10d72d: 09 c2 or %eax,%edx
10d72f: 83 fe 03 cmp $0x3,%esi
10d732: 0f 84 80 00 00 00 je 10d7b8 <_Objects_Set_name+0xd0>
10d738: 0f be 43 03 movsbl 0x3(%ebx),%eax
10d73c: 09 c2 or %eax,%edx
10d73e: 8b 45 0c mov 0xc(%ebp),%eax
10d741: 89 50 0c mov %edx,0xc(%eax)
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
10d744: b0 01 mov $0x1,%al
}
10d746: 8d 65 f4 lea -0xc(%ebp),%esp
10d749: 5b pop %ebx
10d74a: 5e pop %esi
10d74b: 5f pop %edi
10d74c: c9 leave
10d74d: c3 ret
10d74e: 66 90 xchg %ax,%ax
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10d750: 89 d0 mov %edx,%eax
10d752: 0d 00 00 20 00 or $0x200000,%eax
10d757: 89 c2 mov %eax,%edx
10d759: 80 ce 20 or $0x20,%dh
10d75c: b8 20 00 00 00 mov $0x20,%eax
10d761: eb d9 jmp 10d73c <_Objects_Set_name+0x54>
10d763: 90 nop
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
10d764: 83 ec 0c sub $0xc,%esp
10d767: 8d 40 01 lea 0x1(%eax),%eax
10d76a: 50 push %eax
10d76b: e8 c0 19 00 00 call 10f130 <_Workspace_Allocate>
10d770: 89 c7 mov %eax,%edi
if ( !d )
10d772: 83 c4 10 add $0x10,%esp
10d775: 85 c0 test %eax,%eax
10d777: 74 3b je 10d7b4 <_Objects_Set_name+0xcc>
return false;
_Workspace_Free( (void *)the_object->name.name_p );
10d779: 83 ec 0c sub $0xc,%esp
10d77c: 8b 45 0c mov 0xc(%ebp),%eax
10d77f: ff 70 0c pushl 0xc(%eax)
10d782: e8 c5 19 00 00 call 10f14c <_Workspace_Free>
the_object->name.name_p = NULL;
10d787: 8b 45 0c mov 0xc(%ebp),%eax
10d78a: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
strncpy( d, name, length );
10d791: 83 c4 0c add $0xc,%esp
10d794: 56 push %esi
10d795: 53 push %ebx
10d796: 57 push %edi
10d797: e8 80 78 00 00 call 11501c <strncpy>
d[length] = '\0';
10d79c: c6 04 37 00 movb $0x0,(%edi,%esi,1)
the_object->name.name_p = d;
10d7a0: 8b 45 0c mov 0xc(%ebp),%eax
10d7a3: 89 78 0c mov %edi,0xc(%eax)
10d7a6: 83 c4 10 add $0x10,%esp
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
10d7a9: b0 01 mov $0x1,%al
}
10d7ab: 8d 65 f4 lea -0xc(%ebp),%esp
10d7ae: 5b pop %ebx
10d7af: 5e pop %esi
10d7b0: 5f pop %edi
10d7b1: c9 leave
10d7b2: c3 ret
10d7b3: 90 nop
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
return false;
10d7b4: 31 c0 xor %eax,%eax
10d7b6: eb 8e jmp 10d746 <_Objects_Set_name+0x5e>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
10d7b8: b8 20 00 00 00 mov $0x20,%eax
10d7bd: e9 7a ff ff ff jmp 10d73c <_Objects_Set_name+0x54>
0010d078 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
10d078: 55 push %ebp
10d079: 89 e5 mov %esp,%ebp
10d07b: 57 push %edi
10d07c: 56 push %esi
10d07d: 53 push %ebx
10d07e: 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 );
10d081: 8b 45 08 mov 0x8(%ebp),%eax
10d084: 0f b7 58 08 movzwl 0x8(%eax),%ebx
block_count = (information->maximum - index_base) /
10d088: 0f b7 48 14 movzwl 0x14(%eax),%ecx
10d08c: 0f b7 40 10 movzwl 0x10(%eax),%eax
10d090: 29 d8 sub %ebx,%eax
10d092: 31 d2 xor %edx,%edx
10d094: f7 f1 div %ecx
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
10d096: 85 c0 test %eax,%eax
10d098: 74 21 je 10d0bb <_Objects_Shrink_information+0x43><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
10d09a: 8b 55 08 mov 0x8(%ebp),%edx
10d09d: 8b 72 30 mov 0x30(%edx),%esi
10d0a0: 3b 0e cmp (%esi),%ecx
10d0a2: 74 1f je 10d0c3 <_Objects_Shrink_information+0x4b><== NEVER TAKEN
10d0a4: 31 d2 xor %edx,%edx
10d0a6: eb 0e jmp 10d0b6 <_Objects_Shrink_information+0x3e>
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
10d0a8: 01 cb add %ecx,%ebx
10d0aa: 8d 3c 95 00 00 00 00 lea 0x0(,%edx,4),%edi
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
10d0b1: 3b 0c 96 cmp (%esi,%edx,4),%ecx
10d0b4: 74 12 je 10d0c8 <_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++ ) {
10d0b6: 42 inc %edx
10d0b7: 39 d0 cmp %edx,%eax
10d0b9: 77 ed ja 10d0a8 <_Objects_Shrink_information+0x30>
return;
}
index_base += information->allocation_size;
}
}
10d0bb: 8d 65 f4 lea -0xc(%ebp),%esp
10d0be: 5b pop %ebx
10d0bf: 5e pop %esi
10d0c0: 5f pop %edi
10d0c1: c9 leave
10d0c2: 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 ] ==
10d0c3: 31 ff xor %edi,%edi <== NOT EXECUTED
10d0c5: 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 *) _Chain_First( &information->Inactive );
10d0c8: 8b 55 08 mov 0x8(%ebp),%edx
10d0cb: 8b 42 20 mov 0x20(%edx),%eax
10d0ce: 89 7d e4 mov %edi,-0x1c(%ebp)
10d0d1: eb 07 jmp 10d0da <_Objects_Shrink_information+0x62>
10d0d3: 90 nop
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
10d0d4: 85 f6 test %esi,%esi
10d0d6: 74 2c je 10d104 <_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;
10d0d8: 89 f0 mov %esi,%eax
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
10d0da: 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;
10d0de: 8b 30 mov (%eax),%esi
if ((index >= index_base) &&
10d0e0: 39 da cmp %ebx,%edx
10d0e2: 72 f0 jb 10d0d4 <_Objects_Shrink_information+0x5c>
(index < (index_base + information->allocation_size))) {
10d0e4: 8b 7d 08 mov 0x8(%ebp),%edi
10d0e7: 0f b7 4f 14 movzwl 0x14(%edi),%ecx
10d0eb: 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) &&
10d0ee: 39 ca cmp %ecx,%edx
10d0f0: 73 e2 jae 10d0d4 <_Objects_Shrink_information+0x5c>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
10d0f2: 83 ec 0c sub $0xc,%esp
10d0f5: 50 push %eax
10d0f6: e8 49 ef ff ff call 10c044 <_Chain_Extract>
10d0fb: 83 c4 10 add $0x10,%esp
}
}
while ( the_object );
10d0fe: 85 f6 test %esi,%esi
10d100: 75 d6 jne 10d0d8 <_Objects_Shrink_information+0x60>
10d102: 66 90 xchg %ax,%ax
10d104: 8b 7d e4 mov -0x1c(%ebp),%edi
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
10d107: 83 ec 0c sub $0xc,%esp
10d10a: 8b 55 08 mov 0x8(%ebp),%edx
10d10d: 8b 42 34 mov 0x34(%edx),%eax
10d110: ff 34 38 pushl (%eax,%edi,1)
10d113: e8 e8 18 00 00 call 10ea00 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
10d118: 8b 55 08 mov 0x8(%ebp),%edx
10d11b: 8b 42 34 mov 0x34(%edx),%eax
10d11e: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1)
information->inactive_per_block[ block ] = 0;
10d125: 8b 42 30 mov 0x30(%edx),%eax
10d128: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1)
information->inactive -= information->allocation_size;
10d12f: 8b 42 14 mov 0x14(%edx),%eax
10d132: 66 29 42 2c sub %ax,0x2c(%edx)
return;
10d136: 83 c4 10 add $0x10,%esp
}
index_base += information->allocation_size;
}
}
10d139: 8d 65 f4 lea -0xc(%ebp),%esp
10d13c: 5b pop %ebx
10d13d: 5e pop %esi
10d13e: 5f pop %edi
10d13f: c9 leave
10d140: c3 ret
0010d56c <_POSIX_Absolute_timeout_to_ticks>:
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
10d56c: 55 push %ebp
10d56d: 89 e5 mov %esp,%ebp
10d56f: 57 push %edi
10d570: 56 push %esi
10d571: 53 push %ebx
10d572: 83 ec 38 sub $0x38,%esp
10d575: 8b 5d 08 mov 0x8(%ebp),%ebx
10d578: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Make sure there is always a value returned.
*/
*ticks_out = 0;
10d57b: c7 06 00 00 00 00 movl $0x0,(%esi)
/*
* Is the absolute time even valid?
*/
if ( !_Timespec_Is_valid(abstime) )
10d581: 53 push %ebx
10d582: e8 cd 3d 00 00 call 111354 <_Timespec_Is_valid>
10d587: 83 c4 10 add $0x10,%esp
10d58a: 84 c0 test %al,%al
10d58c: 75 0a jne 10d598 <_POSIX_Absolute_timeout_to_ticks+0x2c>
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
10d58e: 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;
}
10d590: 8d 65 f4 lea -0xc(%ebp),%esp
10d593: 5b pop %ebx
10d594: 5e pop %esi
10d595: 5f pop %edi
10d596: c9 leave
10d597: c3 ret
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
/*
* Is the absolute time in the past?
*/
_TOD_Get( ¤t_time );
10d598: 83 ec 0c sub $0xc,%esp
10d59b: 8d 7d e0 lea -0x20(%ebp),%edi
10d59e: 57 push %edi
10d59f: e8 7c 1d 00 00 call 10f320 <_TOD_Get>
if ( _Timespec_Less_than( abstime, ¤t_time ) )
10d5a4: 5a pop %edx
10d5a5: 59 pop %ecx
10d5a6: 57 push %edi
10d5a7: 53 push %ebx
10d5a8: e8 cf 3d 00 00 call 11137c <_Timespec_Less_than>
10d5ad: 83 c4 10 add $0x10,%esp
10d5b0: 84 c0 test %al,%al
10d5b2: 74 10 je 10d5c4 <_POSIX_Absolute_timeout_to_ticks+0x58>
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
10d5b4: 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;
}
10d5b9: 8d 65 f4 lea -0xc(%ebp),%esp
10d5bc: 5b pop %ebx
10d5bd: 5e pop %esi
10d5be: 5f pop %edi
10d5bf: c9 leave
10d5c0: c3 ret
10d5c1: 8d 76 00 lea 0x0(%esi),%esi
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
/*
* How long until the requested absolute time?
*/
_Timespec_Subtract( ¤t_time, abstime, &difference );
10d5c4: 50 push %eax
10d5c5: 8d 45 d8 lea -0x28(%ebp),%eax
10d5c8: 50 push %eax
10d5c9: 53 push %ebx
10d5ca: 57 push %edi
10d5cb: 89 45 d4 mov %eax,-0x2c(%ebp)
10d5ce: e8 cd 3d 00 00 call 1113a0 <_Timespec_Subtract>
/*
* Internally the SuperCore uses ticks, so convert to them.
*/
*ticks_out = _Timespec_To_ticks( &difference );
10d5d3: 8b 45 d4 mov -0x2c(%ebp),%eax
10d5d6: 89 04 24 mov %eax,(%esp)
10d5d9: e8 02 3e 00 00 call 1113e0 <_Timespec_To_ticks>
10d5de: 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 )
10d5e0: 83 c4 10 add $0x10,%esp
return POSIX_ABSOLUTE_TIMEOUT_IS_NOW;
10d5e3: 83 f8 01 cmp $0x1,%eax
10d5e6: 19 c0 sbb %eax,%eax
10d5e8: 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;
}
10d5eb: 8d 65 f4 lea -0xc(%ebp),%esp
10d5ee: 5b pop %ebx
10d5ef: 5e pop %esi
10d5f0: 5f pop %edi
10d5f1: c9 leave
10d5f2: c3 ret
0010c124 <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
10c124: 55 push %ebp
10c125: 89 e5 mov %esp,%ebp
10c127: 56 push %esi
10c128: 53 push %ebx
10c129: 8b 5d 08 mov 0x8(%ebp),%ebx
10c12c: 8b 75 0c mov 0xc(%ebp),%esi
int status;
if ( !cond ) {
10c12f: 85 db test %ebx,%ebx
10c131: 74 39 je 10c16c <_POSIX_Condition_variables_Get+0x48>
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *cond == PTHREAD_COND_INITIALIZER ) {
10c133: 8b 03 mov (%ebx),%eax
10c135: 83 f8 ff cmp $0xffffffff,%eax
10c138: 74 1a je 10c154 <_POSIX_Condition_variables_Get+0x30>
}
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)_Objects_Get(
10c13a: 52 push %edx
10c13b: 56 push %esi
10c13c: 50 push %eax
10c13d: 68 60 aa 12 00 push $0x12aa60
10c142: e8 75 2b 00 00 call 10ecbc <_Objects_Get>
10c147: 83 c4 10 add $0x10,%esp
&_POSIX_Condition_variables_Information,
(Objects_Id) *cond,
location
);
}
10c14a: 8d 65 f8 lea -0x8(%ebp),%esp
10c14d: 5b pop %ebx
10c14e: 5e pop %esi
10c14f: c9 leave
10c150: c3 ret
10c151: 8d 76 00 lea 0x0(%esi),%esi
if ( *cond == PTHREAD_COND_INITIALIZER ) {
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( cond, 0 );
10c154: 83 ec 08 sub $0x8,%esp
10c157: 6a 00 push $0x0
10c159: 53 push %ebx
10c15a: e8 19 00 00 00 call 10c178 <pthread_cond_init>
if ( status ) {
10c15f: 83 c4 10 add $0x10,%esp
10c162: 85 c0 test %eax,%eax
10c164: 75 06 jne 10c16c <_POSIX_Condition_variables_Get+0x48>
10c166: 8b 03 mov (%ebx),%eax
10c168: eb d0 jmp 10c13a <_POSIX_Condition_variables_Get+0x16>
10c16a: 66 90 xchg %ax,%ax
*location = OBJECTS_ERROR;
10c16c: c7 06 01 00 00 00 movl $0x1,(%esi)
return (POSIX_Condition_variables_Control *) 0;
10c172: 31 c0 xor %eax,%eax
10c174: eb d4 jmp 10c14a <_POSIX_Condition_variables_Get+0x26>
0010c240 <_POSIX_Condition_variables_Signal_support>:
int _POSIX_Condition_variables_Signal_support(
pthread_cond_t *cond,
bool is_broadcast
)
{
10c240: 55 push %ebp
10c241: 89 e5 mov %esp,%ebp
10c243: 57 push %edi
10c244: 56 push %esi
10c245: 53 push %ebx
10c246: 83 ec 24 sub $0x24,%esp
10c249: 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 );
10c24c: 8d 45 e4 lea -0x1c(%ebp),%eax
10c24f: 50 push %eax
10c250: ff 75 08 pushl 0x8(%ebp)
10c253: e8 cc fe ff ff call 10c124 <_POSIX_Condition_variables_Get>
10c258: 89 c7 mov %eax,%edi
switch ( location ) {
10c25a: 83 c4 10 add $0x10,%esp
10c25d: 8b 45 e4 mov -0x1c(%ebp),%eax
10c260: 85 c0 test %eax,%eax
10c262: 74 10 je 10c274 <_POSIX_Condition_variables_Signal_support+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c264: b8 16 00 00 00 mov $0x16,%eax
}
10c269: 8d 65 f4 lea -0xc(%ebp),%esp
10c26c: 5b pop %ebx
10c26d: 5e pop %esi
10c26e: 5f pop %edi
10c26f: c9 leave
10c270: c3 ret
10c271: 8d 76 00 lea 0x0(%esi),%esi
10c274: 8d 77 18 lea 0x18(%edi),%esi
10c277: eb 0b jmp 10c284 <_POSIX_Condition_variables_Signal_support+0x44>
10c279: 8d 76 00 lea 0x0(%esi),%esi
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 );
10c27c: 84 db test %bl,%bl
10c27e: 74 20 je 10c2a0 <_POSIX_Condition_variables_Signal_support+0x60>
10c280: 85 c0 test %eax,%eax
10c282: 74 1c je 10c2a0 <_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 );
10c284: 83 ec 0c sub $0xc,%esp
10c287: 56 push %esi
10c288: e8 37 39 00 00 call 10fbc4 <_Thread_queue_Dequeue>
if ( !the_thread )
10c28d: 83 c4 10 add $0x10,%esp
10c290: 85 c0 test %eax,%eax
10c292: 75 e8 jne 10c27c <_POSIX_Condition_variables_Signal_support+0x3c>
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10c294: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi)
} while ( is_broadcast && the_thread );
10c29b: 84 db test %bl,%bl
10c29d: 75 e1 jne 10c280 <_POSIX_Condition_variables_Signal_support+0x40>
10c29f: 90 nop
_Thread_Enable_dispatch();
10c2a0: e8 9f 35 00 00 call 10f844 <_Thread_Enable_dispatch>
return 0;
10c2a5: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c2a7: 8d 65 f4 lea -0xc(%ebp),%esp
10c2aa: 5b pop %ebx
10c2ab: 5e pop %esi
10c2ac: 5f pop %edi
10c2ad: c9 leave
10c2ae: c3 ret
0010c308 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
10c308: 55 push %ebp
10c309: 89 e5 mov %esp,%ebp
10c30b: 57 push %edi
10c30c: 56 push %esi
10c30d: 53 push %ebx
10c30e: 83 ec 34 sub $0x34,%esp
10c311: 8b 7d 08 mov 0x8(%ebp),%edi
10c314: 8b 5d 0c mov 0xc(%ebp),%ebx
10c317: 8a 45 14 mov 0x14(%ebp),%al
10c31a: 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 ) ) {
10c31d: 8d 75 e4 lea -0x1c(%ebp),%esi
10c320: 56 push %esi
10c321: 53 push %ebx
10c322: e8 59 01 00 00 call 10c480 <_POSIX_Mutex_Get>
10c327: 83 c4 10 add $0x10,%esp
10c32a: 85 c0 test %eax,%eax
10c32c: 74 21 je 10c34f <_POSIX_Condition_variables_Wait_support+0x47>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10c32e: a1 b0 a5 12 00 mov 0x12a5b0,%eax
10c333: 48 dec %eax
10c334: a3 b0 a5 12 00 mov %eax,0x12a5b0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c339: 83 ec 08 sub $0x8,%esp
10c33c: 56 push %esi
10c33d: 57 push %edi
10c33e: e8 e1 fd ff ff call 10c124 <_POSIX_Condition_variables_Get>
10c343: 89 c6 mov %eax,%esi
switch ( location ) {
10c345: 83 c4 10 add $0x10,%esp
10c348: 8b 55 e4 mov -0x1c(%ebp),%edx
10c34b: 85 d2 test %edx,%edx
10c34d: 74 11 je 10c360 <_POSIX_Condition_variables_Wait_support+0x58>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c34f: be 16 00 00 00 mov $0x16,%esi
}
10c354: 89 f0 mov %esi,%eax
10c356: 8d 65 f4 lea -0xc(%ebp),%esp
10c359: 5b pop %ebx
10c35a: 5e pop %esi
10c35b: 5f pop %edi
10c35c: c9 leave
10c35d: c3 ret
10c35e: 66 90 xchg %ax,%ax
the_cond = _POSIX_Condition_variables_Get( cond, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
10c360: 8b 40 14 mov 0x14(%eax),%eax
10c363: 85 c0 test %eax,%eax
10c365: 74 19 je 10c380 <_POSIX_Condition_variables_Wait_support+0x78>
10c367: 3b 03 cmp (%ebx),%eax
10c369: 74 15 je 10c380 <_POSIX_Condition_variables_Wait_support+0x78>
_Thread_Enable_dispatch();
10c36b: e8 d4 34 00 00 call 10f844 <_Thread_Enable_dispatch>
return EINVAL;
10c370: be 16 00 00 00 mov $0x16,%esi
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c375: 89 f0 mov %esi,%eax
10c377: 8d 65 f4 lea -0xc(%ebp),%esp
10c37a: 5b pop %ebx
10c37b: 5e pop %esi
10c37c: 5f pop %edi
10c37d: c9 leave
10c37e: c3 ret
10c37f: 90 nop
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
_Thread_Enable_dispatch();
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
10c380: 83 ec 0c sub $0xc,%esp
10c383: 53 push %ebx
10c384: e8 73 03 00 00 call 10c6fc <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
10c389: 83 c4 10 add $0x10,%esp
10c38c: 80 7d d7 00 cmpb $0x0,-0x29(%ebp)
10c390: 75 4e jne 10c3e0 <_POSIX_Condition_variables_Wait_support+0xd8>
the_cond->Mutex = *mutex;
10c392: 8b 03 mov (%ebx),%eax
10c394: 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;
10c397: 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;
10c39e: a1 58 ab 12 00 mov 0x12ab58,%eax
10c3a3: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
10c3aa: 83 c6 18 add $0x18,%esi
10c3ad: 89 70 44 mov %esi,0x44(%eax)
_Thread_Executing->Wait.id = *cond;
10c3b0: 8b 17 mov (%edi),%edx
10c3b2: 89 50 20 mov %edx,0x20(%eax)
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
10c3b5: 50 push %eax
10c3b6: 68 68 00 11 00 push $0x110068
10c3bb: ff 75 10 pushl 0x10(%ebp)
10c3be: 56 push %esi
10c3bf: e8 28 39 00 00 call 10fcec <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10c3c4: e8 7b 34 00 00 call 10f844 <_Thread_Enable_dispatch>
* a POSIX signal, then pthread_cond_wait returns spuriously,
* according to the POSIX standard. It means that pthread_cond_wait
* returns a success status, except for the fact that it was not
* woken up a pthread_cond_signal or a pthread_cond_broadcast.
*/
status = _Thread_Executing->Wait.return_code;
10c3c9: a1 58 ab 12 00 mov 0x12ab58,%eax
10c3ce: 8b 70 34 mov 0x34(%eax),%esi
if ( status == EINTR )
10c3d1: 83 c4 10 add $0x10,%esp
10c3d4: 83 fe 04 cmp $0x4,%esi
10c3d7: 75 11 jne 10c3ea <_POSIX_Condition_variables_Wait_support+0xe2>
status = 0;
10c3d9: 31 f6 xor %esi,%esi
10c3db: eb 0d jmp 10c3ea <_POSIX_Condition_variables_Wait_support+0xe2>
10c3dd: 8d 76 00 lea 0x0(%esi),%esi
} else {
_Thread_Enable_dispatch();
10c3e0: e8 5f 34 00 00 call 10f844 <_Thread_Enable_dispatch>
status = ETIMEDOUT;
10c3e5: be 74 00 00 00 mov $0x74,%esi
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
10c3ea: 83 ec 0c sub $0xc,%esp
10c3ed: 53 push %ebx
10c3ee: e8 81 02 00 00 call 10c674 <pthread_mutex_lock>
if ( mutex_status )
10c3f3: 83 c4 10 add $0x10,%esp
10c3f6: 85 c0 test %eax,%eax
10c3f8: 0f 85 51 ff ff ff jne 10c34f <_POSIX_Condition_variables_Wait_support+0x47>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c3fe: 89 f0 mov %esi,%eax
10c400: 8d 65 f4 lea -0xc(%ebp),%esp
10c403: 5b pop %ebx
10c404: 5e pop %esi
10c405: 5f pop %edi
10c406: c9 leave
10c407: c3 ret
001163f8 <_POSIX_Message_queue_Create_support>:
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
1163f8: 55 push %ebp
1163f9: 89 e5 mov %esp,%ebp
1163fb: 57 push %edi
1163fc: 56 push %esi
1163fd: 53 push %ebx
1163fe: 83 ec 24 sub $0x24,%esp
116401: 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 );
116404: 68 ff 00 00 00 push $0xff
116409: ff 75 08 pushl 0x8(%ebp)
11640c: e8 e7 4b 00 00 call 11aff8 <strnlen>
116411: 89 c6 mov %eax,%esi
116413: a1 90 0f 13 00 mov 0x130f90,%eax
116418: 40 inc %eax
116419: a3 90 0f 13 00 mov %eax,0x130f90
* 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 ) {
11641e: 83 c4 10 add $0x10,%esp
116421: 85 db test %ebx,%ebx
116423: 0f 84 b7 00 00 00 je 1164e0 <_POSIX_Message_queue_Create_support+0xe8>
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
116429: 8b 7b 04 mov 0x4(%ebx),%edi
11642c: 85 ff test %edi,%edi
11642e: 0f 8e f0 00 00 00 jle 116524 <_POSIX_Message_queue_Create_support+0x12c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
116434: 8b 5b 08 mov 0x8(%ebx),%ebx
116437: 89 5d e4 mov %ebx,-0x1c(%ebp)
11643a: 85 db test %ebx,%ebx
11643c: 0f 8e e2 00 00 00 jle 116524 <_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 );
116442: 83 ec 0c sub $0xc,%esp
116445: 68 20 13 13 00 push $0x131320
11644a: e8 9d c3 ff ff call 1127ec <_Objects_Allocate>
11644f: 89 c3 mov %eax,%ebx
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
116451: 83 c4 10 add $0x10,%esp
116454: 85 c0 test %eax,%eax
116456: 0f 84 0a 01 00 00 je 116566 <_POSIX_Message_queue_Create_support+0x16e>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
11645c: 8b 45 0c mov 0xc(%ebp),%eax
11645f: 89 43 10 mov %eax,0x10(%ebx)
the_mq->named = true;
116462: c6 43 14 01 movb $0x1,0x14(%ebx)
the_mq->open_count = 1;
116466: c7 43 18 01 00 00 00 movl $0x1,0x18(%ebx)
the_mq->linked = true;
11646d: 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);
116471: 8d 56 01 lea 0x1(%esi),%edx
116474: 83 ec 0c sub $0xc,%esp
116477: 52 push %edx
116478: 89 55 e0 mov %edx,-0x20(%ebp)
11647b: e8 e0 e4 ff ff call 114960 <_Workspace_Allocate>
116480: 89 c6 mov %eax,%esi
if (!name) {
116482: 83 c4 10 add $0x10,%esp
116485: 85 c0 test %eax,%eax
116487: 8b 55 e0 mov -0x20(%ebp),%edx
11648a: 0f 84 ab 00 00 00 je 11653b <_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 );
116490: 50 push %eax
116491: 52 push %edx
116492: ff 75 08 pushl 0x8(%ebp)
116495: 56 push %esi
116496: e8 e1 4a 00 00 call 11af7c <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;
11649b: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx)
if ( !_CORE_message_queue_Initialize(
1164a2: ff 75 e4 pushl -0x1c(%ebp)
1164a5: 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;
1164a6: 8d 43 5c lea 0x5c(%ebx),%eax
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( !_CORE_message_queue_Initialize(
1164a9: 50 push %eax
1164aa: 8d 43 1c lea 0x1c(%ebx),%eax
1164ad: 50 push %eax
1164ae: e8 25 0f 00 00 call 1173d8 <_CORE_message_queue_Initialize>
1164b3: 83 c4 20 add $0x20,%esp
1164b6: 84 c0 test %al,%al
1164b8: 74 3a je 1164f4 <_POSIX_Message_queue_Create_support+0xfc>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
1164ba: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
1164be: a1 3c 13 13 00 mov 0x13133c,%eax
1164c3: 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;
1164c6: 89 73 0c mov %esi,0xc(%ebx)
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
1164c9: 8b 45 14 mov 0x14(%ebp),%eax
1164cc: 89 18 mov %ebx,(%eax)
_Thread_Enable_dispatch();
1164ce: e8 d5 d3 ff ff call 1138a8 <_Thread_Enable_dispatch>
return 0;
1164d3: 31 c0 xor %eax,%eax
}
1164d5: 8d 65 f4 lea -0xc(%ebp),%esp
1164d8: 5b pop %ebx
1164d9: 5e pop %esi
1164da: 5f pop %edi
1164db: c9 leave
1164dc: c3 ret
1164dd: 8d 76 00 lea 0x0(%esi),%esi
* 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;
1164e0: 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;
1164e7: bf 0a 00 00 00 mov $0xa,%edi
1164ec: e9 51 ff ff ff jmp 116442 <_POSIX_Message_queue_Create_support+0x4a>
1164f1: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
1164f4: 83 ec 08 sub $0x8,%esp
1164f7: 53 push %ebx
1164f8: 68 20 13 13 00 push $0x131320
1164fd: e8 5e c6 ff ff call 112b60 <_Objects_Free>
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
116502: 89 34 24 mov %esi,(%esp)
116505: e8 72 e4 ff ff call 11497c <_Workspace_Free>
_Thread_Enable_dispatch();
11650a: e8 99 d3 ff ff call 1138a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
11650f: e8 60 33 00 00 call 119874 <__errno>
116514: c7 00 1c 00 00 00 movl $0x1c,(%eax)
11651a: 83 c4 10 add $0x10,%esp
11651d: b8 ff ff ff ff mov $0xffffffff,%eax
116522: eb b1 jmp 1164d5 <_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();
116524: e8 7f d3 ff ff call 1138a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
116529: e8 46 33 00 00 call 119874 <__errno>
11652e: c7 00 16 00 00 00 movl $0x16,(%eax)
116534: b8 ff ff ff ff mov $0xffffffff,%eax
116539: eb 9a jmp 1164d5 <_POSIX_Message_queue_Create_support+0xdd>
11653b: 83 ec 08 sub $0x8,%esp
11653e: 53 push %ebx
11653f: 68 20 13 13 00 push $0x131320
116544: e8 17 c6 ff ff call 112b60 <_Objects_Free>
* dynamically constructed.
*/
name = _Workspace_Allocate(n+1);
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
116549: e8 5a d3 ff ff call 1138a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOMEM );
11654e: e8 21 33 00 00 call 119874 <__errno>
116553: c7 00 0c 00 00 00 movl $0xc,(%eax)
116559: 83 c4 10 add $0x10,%esp
11655c: b8 ff ff ff ff mov $0xffffffff,%eax
116561: e9 6f ff ff ff jmp 1164d5 <_POSIX_Message_queue_Create_support+0xdd>
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
116566: e8 3d d3 ff ff call 1138a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
11656b: e8 04 33 00 00 call 119874 <__errno>
116570: c7 00 17 00 00 00 movl $0x17,(%eax)
116576: b8 ff ff ff ff mov $0xffffffff,%eax
11657b: e9 55 ff ff ff jmp 1164d5 <_POSIX_Message_queue_Create_support+0xdd>
00116580 <_POSIX_Message_queue_Name_to_id>:
*/
int _POSIX_Message_queue_Name_to_id(
const char *name,
Objects_Id *id
)
{
116580: 55 push %ebp
116581: 89 e5 mov %esp,%ebp
116583: 53 push %ebx
116584: 83 ec 14 sub $0x14,%esp
116587: 8b 5d 08 mov 0x8(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
11658a: 85 db test %ebx,%ebx
11658c: 74 05 je 116593 <_POSIX_Message_queue_Name_to_id+0x13>
return EINVAL;
if ( !name[0] )
11658e: 80 3b 00 cmpb $0x0,(%ebx)
116591: 75 0d jne 1165a0 <_POSIX_Message_queue_Name_to_id+0x20>
return EINVAL;
116593: b8 16 00 00 00 mov $0x16,%eax
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
116598: 8b 5d fc mov -0x4(%ebp),%ebx
11659b: c9 leave
11659c: c3 ret
11659d: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
if ( !name[0] )
return EINVAL;
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
1165a0: 83 ec 08 sub $0x8,%esp
1165a3: 68 ff 00 00 00 push $0xff
1165a8: 53 push %ebx
1165a9: e8 4a 4a 00 00 call 11aff8 <strnlen>
1165ae: 83 c4 10 add $0x10,%esp
1165b1: 3d fe 00 00 00 cmp $0xfe,%eax
1165b6: 76 0c jbe 1165c4 <_POSIX_Message_queue_Name_to_id+0x44>
return ENAMETOOLONG;
1165b8: b8 5b 00 00 00 mov $0x5b,%eax
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
1165bd: 8b 5d fc mov -0x4(%ebp),%ebx
1165c0: c9 leave
1165c1: c3 ret
1165c2: 66 90 xchg %ax,%ax
return EINVAL;
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
return ENAMETOOLONG;
status = _Objects_Name_to_id_string(
1165c4: 50 push %eax
1165c5: 8d 45 f4 lea -0xc(%ebp),%eax
1165c8: 50 push %eax
1165c9: 53 push %ebx
1165ca: 68 20 13 13 00 push $0x131320
1165cf: e8 24 14 00 00 call 1179f8 <_Objects_Name_to_id_string>
&_POSIX_Message_queue_Information,
name,
&the_id
);
*id = the_id;
1165d4: 8b 4d f4 mov -0xc(%ebp),%ecx
1165d7: 8b 55 0c mov 0xc(%ebp),%edx
1165da: 89 0a mov %ecx,(%edx)
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
1165dc: 83 c4 10 add $0x10,%esp
return 0;
1165df: 83 f8 01 cmp $0x1,%eax
1165e2: 19 c0 sbb %eax,%eax
1165e4: f7 d0 not %eax
1165e6: 83 e0 02 and $0x2,%eax
return ENOENT;
}
1165e9: 8b 5d fc mov -0x4(%ebp),%ebx
1165ec: c9 leave
1165ed: c3 ret
0010fd30 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
10fd30: 55 push %ebp
10fd31: 89 e5 mov %esp,%ebp
10fd33: 53 push %ebx
10fd34: 83 ec 28 sub $0x28,%esp
10fd37: 8b 5d 08 mov 0x8(%ebp),%ebx
10fd3a: 8a 45 18 mov 0x18(%ebp),%al
10fd3d: 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 );
10fd40: 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(
10fd43: 50 push %eax
10fd44: 53 push %ebx
10fd45: 68 c0 14 13 00 push $0x1314c0
10fd4a: e8 51 2f 00 00 call 112ca0 <_Objects_Get>
switch ( location ) {
10fd4f: 83 c4 10 add $0x10,%esp
10fd52: 8b 55 f4 mov -0xc(%ebp),%edx
10fd55: 85 d2 test %edx,%edx
10fd57: 74 17 je 10fd70 <_POSIX_Message_queue_Receive_support+0x40>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10fd59: e8 16 9b 00 00 call 119874 <__errno>
10fd5e: c7 00 09 00 00 00 movl $0x9,(%eax)
10fd64: b8 ff ff ff ff mov $0xffffffff,%eax
}
10fd69: 8b 5d fc mov -0x4(%ebp),%ebx
10fd6c: c9 leave
10fd6d: c3 ret
10fd6e: 66 90 xchg %ax,%ax
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
10fd70: 8b 50 14 mov 0x14(%eax),%edx
10fd73: 89 d1 mov %edx,%ecx
10fd75: 83 e1 03 and $0x3,%ecx
10fd78: 49 dec %ecx
10fd79: 0f 84 af 00 00 00 je 10fe2e <_POSIX_Message_queue_Receive_support+0xfe>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
10fd7f: 8b 40 10 mov 0x10(%eax),%eax
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
10fd82: 8b 4d 10 mov 0x10(%ebp),%ecx
10fd85: 39 48 68 cmp %ecx,0x68(%eax)
10fd88: 77 62 ja 10fdec <_POSIX_Message_queue_Receive_support+0xbc>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
10fd8a: 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 )
10fd91: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10fd95: 75 45 jne 10fddc <_POSIX_Message_queue_Receive_support+0xac><== ALWAYS TAKEN
10fd97: 31 d2 xor %edx,%edx <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
10fd99: 83 ec 08 sub $0x8,%esp
10fd9c: ff 75 1c pushl 0x1c(%ebp)
10fd9f: 52 push %edx
10fda0: 8d 55 f0 lea -0x10(%ebp),%edx
10fda3: 52 push %edx
10fda4: ff 75 0c pushl 0xc(%ebp)
10fda7: 53 push %ebx
10fda8: 83 c0 1c add $0x1c,%eax
10fdab: 50 push %eax
10fdac: e8 9f 1f 00 00 call 111d50 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
10fdb1: 83 c4 20 add $0x20,%esp
10fdb4: e8 ef 3a 00 00 call 1138a8 <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
10fdb9: 8b 15 38 15 13 00 mov 0x131538,%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);
10fdbf: 8b 42 24 mov 0x24(%edx),%eax
10fdc2: 85 c0 test %eax,%eax
10fdc4: 78 22 js 10fde8 <_POSIX_Message_queue_Receive_support+0xb8>
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
10fdc6: 8b 4d 14 mov 0x14(%ebp),%ecx
10fdc9: 89 01 mov %eax,(%ecx)
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
10fdcb: 8b 42 34 mov 0x34(%edx),%eax
10fdce: 85 c0 test %eax,%eax
10fdd0: 75 36 jne 10fe08 <_POSIX_Message_queue_Receive_support+0xd8>
return length_out;
10fdd2: 8b 45 f0 mov -0x10(%ebp),%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10fdd5: 8b 5d fc mov -0x4(%ebp),%ebx
10fdd8: c9 leave
10fdd9: c3 ret
10fdda: 66 90 xchg %ax,%ax
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10fddc: 80 e6 40 and $0x40,%dh
10fddf: 0f 94 c2 sete %dl
10fde2: 0f b6 d2 movzbl %dl,%edx
10fde5: eb b2 jmp 10fd99 <_POSIX_Message_queue_Receive_support+0x69>
10fde7: 90 nop
10fde8: f7 d8 neg %eax
10fdea: eb da jmp 10fdc6 <_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();
10fdec: e8 b7 3a 00 00 call 1138a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
10fdf1: e8 7e 9a 00 00 call 119874 <__errno>
10fdf6: c7 00 7a 00 00 00 movl $0x7a,(%eax)
10fdfc: b8 ff ff ff ff mov $0xffffffff,%eax
10fe01: e9 63 ff ff ff jmp 10fd69 <_POSIX_Message_queue_Receive_support+0x39>
10fe06: 66 90 xchg %ax,%ax
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
return length_out;
rtems_set_errno_and_return_minus_one(
10fe08: e8 67 9a 00 00 call 119874 <__errno>
10fe0d: 89 c3 mov %eax,%ebx
10fe0f: 83 ec 0c sub $0xc,%esp
10fe12: a1 38 15 13 00 mov 0x131538,%eax
10fe17: ff 70 34 pushl 0x34(%eax)
10fe1a: e8 29 02 00 00 call 110048 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
10fe1f: 89 03 mov %eax,(%ebx)
10fe21: 83 c4 10 add $0x10,%esp
10fe24: b8 ff ff ff ff mov $0xffffffff,%eax
10fe29: e9 3b ff ff ff jmp 10fd69 <_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();
10fe2e: e8 75 3a 00 00 call 1138a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
10fe33: e8 3c 9a 00 00 call 119874 <__errno>
10fe38: c7 00 09 00 00 00 movl $0x9,(%eax)
10fe3e: b8 ff ff ff ff mov $0xffffffff,%eax
10fe43: e9 21 ff ff ff jmp 10fd69 <_POSIX_Message_queue_Receive_support+0x39>
0010fe68 <_POSIX_Message_queue_Send_support>:
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
10fe68: 55 push %ebp
10fe69: 89 e5 mov %esp,%ebp
10fe6b: 56 push %esi
10fe6c: 53 push %ebx
10fe6d: 83 ec 20 sub $0x20,%esp
10fe70: 8b 75 08 mov 0x8(%ebp),%esi
10fe73: 8b 5d 14 mov 0x14(%ebp),%ebx
10fe76: 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 )
10fe79: 83 fb 20 cmp $0x20,%ebx
10fe7c: 0f 87 92 00 00 00 ja 10ff14 <_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(
10fe82: 51 push %ecx
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
10fe83: 8d 45 f4 lea -0xc(%ebp),%eax
10fe86: 50 push %eax
10fe87: 56 push %esi
10fe88: 68 c0 14 13 00 push $0x1314c0
10fe8d: 88 55 e4 mov %dl,-0x1c(%ebp)
10fe90: e8 0b 2e 00 00 call 112ca0 <_Objects_Get>
switch ( location ) {
10fe95: 83 c4 10 add $0x10,%esp
10fe98: 8b 55 f4 mov -0xc(%ebp),%edx
10fe9b: 85 d2 test %edx,%edx
10fe9d: 8a 55 e4 mov -0x1c(%ebp),%dl
10fea0: 75 5e jne 10ff00 <_POSIX_Message_queue_Send_support+0x98>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
10fea2: 8b 48 14 mov 0x14(%eax),%ecx
10fea5: f6 c1 03 test $0x3,%cl
10fea8: 74 7e je 10ff28 <_POSIX_Message_queue_Send_support+0xc0>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
10feaa: 8b 40 10 mov 0x10(%eax),%eax
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10fead: 84 d2 test %dl,%dl
10feaf: 75 37 jne 10fee8 <_POSIX_Message_queue_Send_support+0x80>
10feb1: 31 d2 xor %edx,%edx
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
10feb3: ff 75 1c pushl 0x1c(%ebp)
10feb6: 52 push %edx
RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core(
unsigned int priority
)
{
return priority * -1;
10feb7: f7 db neg %ebx
10feb9: 53 push %ebx
10feba: 6a 00 push $0x0
10febc: 56 push %esi
10febd: ff 75 10 pushl 0x10(%ebp)
10fec0: ff 75 0c pushl 0xc(%ebp)
10fec3: 83 c0 1c add $0x1c,%eax
10fec6: 50 push %eax
10fec7: e8 b0 1f 00 00 call 111e7c <_CORE_message_queue_Submit>
10fecc: 89 c3 mov %eax,%ebx
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
10fece: 83 c4 20 add $0x20,%esp
10fed1: e8 d2 39 00 00 call 1138a8 <_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 )
10fed6: 83 fb 07 cmp $0x7,%ebx
10fed9: 74 19 je 10fef4 <_POSIX_Message_queue_Send_support+0x8c>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
10fedb: 85 db test %ebx,%ebx
10fedd: 75 61 jne 10ff40 <_POSIX_Message_queue_Send_support+0xd8>
return msg_status;
10fedf: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
10fee1: 8d 65 f8 lea -0x8(%ebp),%esp
10fee4: 5b pop %ebx
10fee5: 5e pop %esi
10fee6: c9 leave
10fee7: c3 ret
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
10fee8: 31 d2 xor %edx,%edx
10feea: f6 c5 40 test $0x40,%ch
10feed: 0f 94 c2 sete %dl
10fef0: eb c1 jmp 10feb3 <_POSIX_Message_queue_Send_support+0x4b>
10fef2: 66 90 xchg %ax,%ax
* 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;
10fef4: a1 38 15 13 00 mov 0x131538,%eax
10fef9: 8b 58 34 mov 0x34(%eax),%ebx
10fefc: eb dd jmp 10fedb <_POSIX_Message_queue_Send_support+0x73>
10fefe: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
10ff00: e8 6f 99 00 00 call 119874 <__errno>
10ff05: c7 00 09 00 00 00 movl $0x9,(%eax)
10ff0b: b8 ff ff ff ff mov $0xffffffff,%eax
10ff10: eb cf jmp 10fee1 <_POSIX_Message_queue_Send_support+0x79>
10ff12: 66 90 xchg %ax,%ax
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
10ff14: e8 5b 99 00 00 call 119874 <__errno>
10ff19: c7 00 16 00 00 00 movl $0x16,(%eax)
10ff1f: b8 ff ff ff ff mov $0xffffffff,%eax
10ff24: eb bb jmp 10fee1 <_POSIX_Message_queue_Send_support+0x79>
10ff26: 66 90 xchg %ax,%ax
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
10ff28: e8 7b 39 00 00 call 1138a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
10ff2d: e8 42 99 00 00 call 119874 <__errno>
10ff32: c7 00 09 00 00 00 movl $0x9,(%eax)
10ff38: b8 ff ff ff ff mov $0xffffffff,%eax
10ff3d: eb a2 jmp 10fee1 <_POSIX_Message_queue_Send_support+0x79>
10ff3f: 90 nop
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
10ff40: e8 2f 99 00 00 call 119874 <__errno>
10ff45: 89 c6 mov %eax,%esi
10ff47: 83 ec 0c sub $0xc,%esp
10ff4a: 53 push %ebx
10ff4b: e8 f8 00 00 00 call 110048 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
10ff50: 89 06 mov %eax,(%esi)
10ff52: 83 c4 10 add $0x10,%esp
10ff55: b8 ff ff ff ff mov $0xffffffff,%eax
10ff5a: eb 85 jmp 10fee1 <_POSIX_Message_queue_Send_support+0x79>
0010d13c <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
10d13c: 55 push %ebp
10d13d: 89 e5 mov %esp,%ebp
10d13f: 56 push %esi
10d140: 53 push %ebx
10d141: 8b 5d 08 mov 0x8(%ebp),%ebx
10d144: 8b 75 0c mov 0xc(%ebp),%esi
___POSIX_Mutex_Get_support_error_check( mutex, location );
10d147: 85 db test %ebx,%ebx
10d149: 74 39 je 10d184 <_POSIX_Mutex_Get+0x48>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d14b: 8b 03 mov (%ebx),%eax
10d14d: 83 f8 ff cmp $0xffffffff,%eax
10d150: 74 1a je 10d16c <_POSIX_Mutex_Get+0x30>
return (POSIX_Mutex_Control *)
_Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location );
10d152: 52 push %edx
10d153: 56 push %esi
10d154: 50 push %eax
10d155: 68 60 d1 12 00 push $0x12d160
10d15a: e8 d9 2b 00 00 call 10fd38 <_Objects_Get>
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
return (POSIX_Mutex_Control *)
10d15f: 83 c4 10 add $0x10,%esp
_Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location );
}
10d162: 8d 65 f8 lea -0x8(%ebp),%esp
10d165: 5b pop %ebx
10d166: 5e pop %esi
10d167: c9 leave
10d168: c3 ret
10d169: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations *location
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d16c: 83 ec 08 sub $0x8,%esp
10d16f: 6a 00 push $0x0
10d171: 53 push %ebx
10d172: e8 b9 00 00 00 call 10d230 <pthread_mutex_init>
10d177: 83 c4 10 add $0x10,%esp
10d17a: 85 c0 test %eax,%eax
10d17c: 75 06 jne 10d184 <_POSIX_Mutex_Get+0x48>
10d17e: 8b 03 mov (%ebx),%eax
10d180: eb d0 jmp 10d152 <_POSIX_Mutex_Get+0x16>
10d182: 66 90 xchg %ax,%ax
10d184: c7 06 01 00 00 00 movl $0x1,(%esi)
10d18a: 31 c0 xor %eax,%eax
10d18c: eb d4 jmp 10d162 <_POSIX_Mutex_Get+0x26>
0010d190 <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
10d190: 55 push %ebp
10d191: 89 e5 mov %esp,%ebp
10d193: 56 push %esi
10d194: 53 push %ebx
10d195: 8b 5d 08 mov 0x8(%ebp),%ebx
10d198: 8b 75 0c mov 0xc(%ebp),%esi
___POSIX_Mutex_Get_support_error_check( mutex, location );
10d19b: 85 db test %ebx,%ebx
10d19d: 74 39 je 10d1d8 <_POSIX_Mutex_Get_interrupt_disable+0x48>
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d19f: 8b 03 mov (%ebx),%eax
10d1a1: 83 f8 ff cmp $0xffffffff,%eax
10d1a4: 74 1a je 10d1c0 <_POSIX_Mutex_Get_interrupt_disable+0x30>
return (POSIX_Mutex_Control *) _Objects_Get_isr_disable(
10d1a6: ff 75 10 pushl 0x10(%ebp)
10d1a9: 56 push %esi
10d1aa: 50 push %eax
10d1ab: 68 60 d1 12 00 push $0x12d160
10d1b0: e8 2b 2b 00 00 call 10fce0 <_Objects_Get_isr_disable>
10d1b5: 83 c4 10 add $0x10,%esp
&_POSIX_Mutex_Information,
(Objects_Id) *mutex,
location,
level
);
}
10d1b8: 8d 65 f8 lea -0x8(%ebp),%esp
10d1bb: 5b pop %ebx
10d1bc: 5e pop %esi
10d1bd: c9 leave
10d1be: c3 ret
10d1bf: 90 nop
ISR_Level *level
)
{
___POSIX_Mutex_Get_support_error_check( mutex, location );
___POSIX_Mutex_Get_support_auto_initialization( mutex, location );
10d1c0: 83 ec 08 sub $0x8,%esp
10d1c3: 6a 00 push $0x0
10d1c5: 53 push %ebx
10d1c6: e8 65 00 00 00 call 10d230 <pthread_mutex_init>
10d1cb: 83 c4 10 add $0x10,%esp
10d1ce: 85 c0 test %eax,%eax
10d1d0: 75 06 jne 10d1d8 <_POSIX_Mutex_Get_interrupt_disable+0x48>
10d1d2: 8b 03 mov (%ebx),%eax
10d1d4: eb d0 jmp 10d1a6 <_POSIX_Mutex_Get_interrupt_disable+0x16>
10d1d6: 66 90 xchg %ax,%ax
10d1d8: c7 06 01 00 00 00 movl $0x1,(%esi)
10d1de: 31 c0 xor %eax,%eax
10d1e0: eb d6 jmp 10d1b8 <_POSIX_Mutex_Get_interrupt_disable+0x28>
0010d390 <_POSIX_Mutex_Lock_support>:
int _POSIX_Mutex_Lock_support(
pthread_mutex_t *mutex,
bool blocking,
Watchdog_Interval timeout
)
{
10d390: 55 push %ebp
10d391: 89 e5 mov %esp,%ebp
10d393: 53 push %ebx
10d394: 83 ec 18 sub $0x18,%esp
10d397: 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 );
10d39a: 8d 45 f0 lea -0x10(%ebp),%eax
10d39d: 50 push %eax
10d39e: 8d 45 f4 lea -0xc(%ebp),%eax
10d3a1: 50 push %eax
10d3a2: ff 75 08 pushl 0x8(%ebp)
10d3a5: e8 e6 fd ff ff call 10d190 <_POSIX_Mutex_Get_interrupt_disable>
switch ( location ) {
10d3aa: 83 c4 10 add $0x10,%esp
10d3ad: 8b 55 f4 mov -0xc(%ebp),%edx
10d3b0: 85 d2 test %edx,%edx
10d3b2: 75 34 jne 10d3e8 <_POSIX_Mutex_Lock_support+0x58>
case OBJECTS_LOCAL:
_CORE_mutex_Seize(
10d3b4: 83 ec 0c sub $0xc,%esp
10d3b7: ff 75 f0 pushl -0x10(%ebp)
10d3ba: ff 75 10 pushl 0x10(%ebp)
10d3bd: 0f b6 db movzbl %bl,%ebx
10d3c0: 53 push %ebx
10d3c1: ff 70 08 pushl 0x8(%eax)
10d3c4: 83 c0 14 add $0x14,%eax
10d3c7: 50 push %eax
10d3c8: e8 3b 1d 00 00 call 10f108 <_CORE_mutex_Seize>
the_mutex->Object.id,
blocking,
timeout,
level
);
return _POSIX_Mutex_Translate_core_mutex_return_code(
10d3cd: 83 c4 14 add $0x14,%esp
(CORE_mutex_Status) _Thread_Executing->Wait.return_code
10d3d0: a1 38 d3 12 00 mov 0x12d338,%eax
the_mutex->Object.id,
blocking,
timeout,
level
);
return _POSIX_Mutex_Translate_core_mutex_return_code(
10d3d5: ff 70 34 pushl 0x34(%eax)
10d3d8: e8 1b 01 00 00 call 10d4f8 <_POSIX_Mutex_Translate_core_mutex_return_code>
10d3dd: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d3e0: 8b 5d fc mov -0x4(%ebp),%ebx
10d3e3: c9 leave
10d3e4: c3 ret
10d3e5: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10d3e8: b8 16 00 00 00 mov $0x16,%eax
}
10d3ed: 8b 5d fc mov -0x4(%ebp),%ebx
10d3f0: c9 leave
10d3f1: c3 ret
001149d8 <_POSIX_Semaphore_Create_support>:
const char *name,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
1149d8: 55 push %ebp
1149d9: 89 e5 mov %esp,%ebp
1149db: 56 push %esi
1149dc: 53 push %ebx
1149dd: 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)
1149e0: 8b 55 0c mov 0xc(%ebp),%edx
1149e3: 85 d2 test %edx,%edx
1149e5: 0f 85 b9 00 00 00 jne 114aa4 <_POSIX_Semaphore_Create_support+0xcc>
rtems_set_errno_and_return_minus_one( ENOSYS );
if ( name ) {
1149eb: 85 db test %ebx,%ebx
1149ed: 74 1c je 114a0b <_POSIX_Semaphore_Create_support+0x33>
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
1149ef: 83 ec 08 sub $0x8,%esp
1149f2: 68 ff 00 00 00 push $0xff
1149f7: 53 push %ebx
1149f8: e8 4b 3d 00 00 call 118748 <strnlen>
1149fd: 83 c4 10 add $0x10,%esp
114a00: 3d fe 00 00 00 cmp $0xfe,%eax
114a05: 0f 87 ad 00 00 00 ja 114ab8 <_POSIX_Semaphore_Create_support+0xe0>
114a0b: a1 d0 db 12 00 mov 0x12dbd0,%eax
114a10: 40 inc %eax
114a11: a3 d0 db 12 00 mov %eax,0x12dbd0
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
_Objects_Allocate( &_POSIX_Semaphore_Information );
114a16: 83 ec 0c sub $0xc,%esp
114a19: 68 e0 de 12 00 push $0x12dee0
114a1e: e8 4d b9 ff ff call 110370 <_Objects_Allocate>
114a23: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
114a25: 83 c4 10 add $0x10,%esp
114a28: 85 c0 test %eax,%eax
114a2a: 0f 84 9a 00 00 00 je 114aca <_POSIX_Semaphore_Create_support+0xf2>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
114a30: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
if ( name ) {
114a37: 85 db test %ebx,%ebx
114a39: 74 55 je 114a90 <_POSIX_Semaphore_Create_support+0xb8>
the_semaphore->named = true;
114a3b: c6 40 14 01 movb $0x1,0x14(%eax)
the_semaphore->open_count = 1;
114a3f: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax)
the_semaphore->linked = true;
114a46: 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;
114a4a: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi)
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
114a51: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi)
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
114a58: 50 push %eax
114a59: 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;
114a5c: 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 );
114a5f: 50 push %eax
114a60: 8d 46 1c lea 0x1c(%esi),%eax
114a63: 50 push %eax
114a64: e8 8f b3 ff ff call 10fdf8 <_CORE_semaphore_Initialize>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
114a69: 0f b7 56 08 movzwl 0x8(%esi),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
114a6d: a1 fc de 12 00 mov 0x12defc,%eax
114a72: 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;
114a75: 89 5e 0c mov %ebx,0xc(%esi)
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name_p
);
*the_sem = the_semaphore;
114a78: 8b 45 14 mov 0x14(%ebp),%eax
114a7b: 89 30 mov %esi,(%eax)
_Thread_Enable_dispatch();
114a7d: e8 aa c9 ff ff call 11142c <_Thread_Enable_dispatch>
return 0;
114a82: 83 c4 10 add $0x10,%esp
114a85: 31 c0 xor %eax,%eax
}
114a87: 8d 65 f8 lea -0x8(%ebp),%esp
114a8a: 5b pop %ebx
114a8b: 5e pop %esi
114a8c: c9 leave
114a8d: c3 ret
114a8e: 66 90 xchg %ax,%ax
if ( name ) {
the_semaphore->named = true;
the_semaphore->open_count = 1;
the_semaphore->linked = true;
} else {
the_semaphore->named = false;
114a90: c6 40 14 00 movb $0x0,0x14(%eax)
the_semaphore->open_count = 0;
114a94: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_semaphore->linked = false;
114a9b: c6 40 15 00 movb $0x0,0x15(%eax)
114a9f: eb a9 jmp 114a4a <_POSIX_Semaphore_Create_support+0x72>
114aa1: 8d 76 00 lea 0x0(%esi),%esi
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 );
114aa4: e8 73 2b 00 00 call 11761c <__errno>
114aa9: c7 00 58 00 00 00 movl $0x58,(%eax)
114aaf: b8 ff ff ff ff mov $0xffffffff,%eax
114ab4: eb d1 jmp 114a87 <_POSIX_Semaphore_Create_support+0xaf>
114ab6: 66 90 xchg %ax,%ax
if ( name ) {
if ( strnlen( name, NAME_MAX ) >= NAME_MAX )
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
114ab8: e8 5f 2b 00 00 call 11761c <__errno>
114abd: c7 00 5b 00 00 00 movl $0x5b,(%eax)
114ac3: b8 ff ff ff ff mov $0xffffffff,%eax
114ac8: eb bd jmp 114a87 <_POSIX_Semaphore_Create_support+0xaf>
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
114aca: e8 5d c9 ff ff call 11142c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSPC );
114acf: e8 48 2b 00 00 call 11761c <__errno>
114ad4: c7 00 1c 00 00 00 movl $0x1c,(%eax)
114ada: b8 ff ff ff ff mov $0xffffffff,%eax
114adf: eb a6 jmp 114a87 <_POSIX_Semaphore_Create_support+0xaf>
00114b34 <_POSIX_Semaphore_Name_to_id>:
int _POSIX_Semaphore_Name_to_id(
const char *name,
sem_t *id
)
{
114b34: 55 push %ebp
114b35: 89 e5 mov %esp,%ebp
114b37: 83 ec 18 sub $0x18,%esp
114b3a: 8b 45 08 mov 0x8(%ebp),%eax
Objects_Name_or_id_lookup_errors status;
Objects_Id the_id;
if ( !name )
114b3d: 85 c0 test %eax,%eax
114b3f: 74 05 je 114b46 <_POSIX_Semaphore_Name_to_id+0x12>
return EINVAL;
if ( !name[0] )
114b41: 80 38 00 cmpb $0x0,(%eax)
114b44: 75 0a jne 114b50 <_POSIX_Semaphore_Name_to_id+0x1c>
return EINVAL;
114b46: b8 16 00 00 00 mov $0x16,%eax
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
return 0;
return ENOENT;
}
114b4b: c9 leave
114b4c: c3 ret
114b4d: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
if ( !name[0] )
return EINVAL;
status = _Objects_Name_to_id_string(
114b50: 52 push %edx
114b51: 8d 55 f4 lea -0xc(%ebp),%edx
114b54: 52 push %edx
114b55: 50 push %eax
114b56: 68 e0 de 12 00 push $0x12dee0
114b5b: e8 90 0c 00 00 call 1157f0 <_Objects_Name_to_id_string>
&_POSIX_Semaphore_Information,
name,
&the_id
);
*id = the_id;
114b60: 8b 4d f4 mov -0xc(%ebp),%ecx
114b63: 8b 55 0c mov 0xc(%ebp),%edx
114b66: 89 0a mov %ecx,(%edx)
if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL )
114b68: 83 c4 10 add $0x10,%esp
return 0;
114b6b: 83 f8 01 cmp $0x1,%eax
114b6e: 19 c0 sbb %eax,%eax
114b70: f7 d0 not %eax
114b72: 83 e0 02 and $0x2,%eax
return ENOENT;
}
114b75: c9 leave
114b76: c3 ret
00114ba0 <_POSIX_Semaphore_Wait_support>:
int _POSIX_Semaphore_Wait_support(
sem_t *sem,
bool blocking,
Watchdog_Interval timeout
)
{
114ba0: 55 push %ebp
114ba1: 89 e5 mov %esp,%ebp
114ba3: 53 push %ebx
114ba4: 83 ec 18 sub $0x18,%esp
114ba7: 8a 5d 0c mov 0xc(%ebp),%bl
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
114baa: 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 );
114bad: 50 push %eax
114bae: 8b 45 08 mov 0x8(%ebp),%eax
114bb1: ff 30 pushl (%eax)
114bb3: 68 e0 de 12 00 push $0x12dee0
114bb8: e8 67 bc ff ff call 110824 <_Objects_Get>
switch ( location ) {
114bbd: 83 c4 10 add $0x10,%esp
114bc0: 8b 55 f4 mov -0xc(%ebp),%edx
114bc3: 85 d2 test %edx,%edx
114bc5: 74 15 je 114bdc <_POSIX_Semaphore_Wait_support+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
114bc7: e8 50 2a 00 00 call 11761c <__errno>
114bcc: c7 00 16 00 00 00 movl $0x16,(%eax)
114bd2: b8 ff ff ff ff mov $0xffffffff,%eax
}
114bd7: 8b 5d fc mov -0x4(%ebp),%ebx
114bda: c9 leave
114bdb: c3 ret
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Seize(
114bdc: ff 75 10 pushl 0x10(%ebp)
114bdf: 0f b6 db movzbl %bl,%ebx
114be2: 53 push %ebx
114be3: ff 70 08 pushl 0x8(%eax)
114be6: 83 c0 1c add $0x1c,%eax
114be9: 50 push %eax
114bea: e8 29 07 00 00 call 115318 <_CORE_semaphore_Seize>
&the_semaphore->Semaphore,
the_semaphore->Object.id,
blocking,
timeout
);
_Thread_Enable_dispatch();
114bef: e8 38 c8 ff ff call 11142c <_Thread_Enable_dispatch>
if ( !_Thread_Executing->Wait.return_code )
114bf4: 83 c4 10 add $0x10,%esp
114bf7: a1 78 e1 12 00 mov 0x12e178,%eax
114bfc: 8b 40 34 mov 0x34(%eax),%eax
114bff: 85 c0 test %eax,%eax
114c01: 75 09 jne 114c0c <_POSIX_Semaphore_Wait_support+0x6c>
return 0;
114c03: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
114c05: 8b 5d fc mov -0x4(%ebp),%ebx
114c08: c9 leave
114c09: c3 ret
114c0a: 66 90 xchg %ax,%ax
_Thread_Enable_dispatch();
if ( !_Thread_Executing->Wait.return_code )
return 0;
rtems_set_errno_and_return_minus_one(
114c0c: e8 0b 2a 00 00 call 11761c <__errno>
114c11: 89 c3 mov %eax,%ebx
114c13: 83 ec 0c sub $0xc,%esp
114c16: a1 78 e1 12 00 mov 0x12e178,%eax
114c1b: ff 70 34 pushl 0x34(%eax)
114c1e: e8 69 25 00 00 call 11718c <_POSIX_Semaphore_Translate_core_semaphore_return_code>
114c23: 89 03 mov %eax,(%ebx)
114c25: 83 c4 10 add $0x10,%esp
114c28: b8 ff ff ff ff mov $0xffffffff,%eax
114c2d: eb a8 jmp 114bd7 <_POSIX_Semaphore_Wait_support+0x37>
0011075c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
11075c: 55 push %ebp
11075d: 89 e5 mov %esp,%ebp
11075f: 83 ec 08 sub $0x8,%esp
110762: 8b 55 08 mov 0x8(%ebp),%edx
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
110765: 8b 82 ec 00 00 00 mov 0xec(%edx),%eax
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
11076b: 8b 88 d8 00 00 00 mov 0xd8(%eax),%ecx
110771: 85 c9 test %ecx,%ecx
110773: 75 09 jne 11077e <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22><== NEVER TAKEN
110775: 83 b8 dc 00 00 00 01 cmpl $0x1,0xdc(%eax)
11077c: 74 06 je 110784 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
11077e: 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();
11077f: e9 cc d6 ff ff jmp 10de50 <_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 &&
110784: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax
11078a: 85 c0 test %eax,%eax
11078c: 74 f0 je 11077e <_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;
11078e: a1 50 91 12 00 mov 0x129150,%eax
110793: 48 dec %eax
110794: a3 50 91 12 00 mov %eax,0x129150
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
110799: 83 ec 08 sub $0x8,%esp
11079c: 6a ff push $0xffffffff
11079e: 52 push %edx
11079f: e8 c0 08 00 00 call 111064 <_POSIX_Thread_Exit>
1107a4: 83 c4 10 add $0x10,%esp
} else
_Thread_Enable_dispatch();
}
1107a7: c9 leave
1107a8: c3 ret
00111abc <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
111abc: 55 push %ebp
111abd: 89 e5 mov %esp,%ebp
111abf: 57 push %edi
111ac0: 56 push %esi
111ac1: 53 push %ebx
111ac2: 83 ec 18 sub $0x18,%esp
111ac5: 8b 5d 08 mov 0x8(%ebp),%ebx
111ac8: 8b 75 0c mov 0xc(%ebp),%esi
111acb: 8b 7d 10 mov 0x10(%ebp),%edi
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
111ace: ff 36 pushl (%esi)
111ad0: e8 cb ff ff ff call 111aa0 <_POSIX_Priority_Is_valid>
111ad5: 83 c4 10 add $0x10,%esp
111ad8: 84 c0 test %al,%al
111ada: 74 2a je 111b06 <_POSIX_Thread_Translate_sched_param+0x4a><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
111adc: c7 07 00 00 00 00 movl $0x0,(%edi)
*budget_callout = NULL;
111ae2: 8b 45 14 mov 0x14(%ebp),%eax
111ae5: c7 00 00 00 00 00 movl $0x0,(%eax)
if ( policy == SCHED_OTHER ) {
111aeb: 85 db test %ebx,%ebx
111aed: 74 25 je 111b14 <_POSIX_Thread_Translate_sched_param+0x58>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
111aef: 83 fb 01 cmp $0x1,%ebx
111af2: 0f 84 90 00 00 00 je 111b88 <_POSIX_Thread_Translate_sched_param+0xcc>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
111af8: 83 fb 02 cmp $0x2,%ebx
111afb: 0f 84 8f 00 00 00 je 111b90 <_POSIX_Thread_Translate_sched_param+0xd4>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
111b01: 83 fb 04 cmp $0x4,%ebx
111b04: 74 1e je 111b24 <_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;
111b06: b8 16 00 00 00 mov $0x16,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
111b0b: 8d 65 f4 lea -0xc(%ebp),%esp
111b0e: 5b pop %ebx
111b0f: 5e pop %esi
111b10: 5f pop %edi
111b11: c9 leave
111b12: c3 ret
111b13: 90 nop
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
111b14: c7 07 01 00 00 00 movl $0x1,(%edi)
return 0;
111b1a: 31 c0 xor %eax,%eax
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
111b1c: 8d 65 f4 lea -0xc(%ebp),%esp
111b1f: 5b pop %ebx
111b20: 5e pop %esi
111b21: 5f pop %edi
111b22: c9 leave
111b23: 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) &&
111b24: 8b 5e 08 mov 0x8(%esi),%ebx
111b27: 85 db test %ebx,%ebx
111b29: 75 07 jne 111b32 <_POSIX_Thread_Translate_sched_param+0x76>
111b2b: 8b 4e 0c mov 0xc(%esi),%ecx
111b2e: 85 c9 test %ecx,%ecx
111b30: 74 d4 je 111b06 <_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) &&
111b32: 8b 56 10 mov 0x10(%esi),%edx
111b35: 85 d2 test %edx,%edx
111b37: 75 07 jne 111b40 <_POSIX_Thread_Translate_sched_param+0x84>
111b39: 8b 46 14 mov 0x14(%esi),%eax
111b3c: 85 c0 test %eax,%eax
111b3e: 74 c6 je 111b06 <_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 ) <
111b40: 83 ec 0c sub $0xc,%esp
111b43: 8d 46 08 lea 0x8(%esi),%eax
111b46: 50 push %eax
111b47: e8 0c da ff ff call 10f558 <_Timespec_To_ticks>
111b4c: 89 c3 mov %eax,%ebx
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
111b4e: 8d 46 10 lea 0x10(%esi),%eax
111b51: 89 04 24 mov %eax,(%esp)
111b54: e8 ff d9 ff ff call 10f558 <_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 ) <
111b59: 83 c4 10 add $0x10,%esp
111b5c: 39 c3 cmp %eax,%ebx
111b5e: 72 a6 jb 111b06 <_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 ) )
111b60: 83 ec 0c sub $0xc,%esp
111b63: ff 76 04 pushl 0x4(%esi)
111b66: e8 35 ff ff ff call 111aa0 <_POSIX_Priority_Is_valid>
111b6b: 83 c4 10 add $0x10,%esp
111b6e: 84 c0 test %al,%al
111b70: 74 94 je 111b06 <_POSIX_Thread_Translate_sched_param+0x4a>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
111b72: c7 07 03 00 00 00 movl $0x3,(%edi)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
111b78: 8b 45 14 mov 0x14(%ebp),%eax
111b7b: c7 00 5c bd 10 00 movl $0x10bd5c,(%eax)
return 0;
111b81: 31 c0 xor %eax,%eax
111b83: eb 86 jmp 111b0b <_POSIX_Thread_Translate_sched_param+0x4f>
111b85: 8d 76 00 lea 0x0(%esi),%esi
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
111b88: 31 c0 xor %eax,%eax
111b8a: e9 7c ff ff ff jmp 111b0b <_POSIX_Thread_Translate_sched_param+0x4f>
111b8f: 90 nop
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
111b90: c7 07 02 00 00 00 movl $0x2,(%edi)
return 0;
111b96: 31 c0 xor %eax,%eax
111b98: e9 6e ff ff ff jmp 111b0b <_POSIX_Thread_Translate_sched_param+0x4f>
00110978 <_POSIX_Threads_Create_extension>:
bool _POSIX_Threads_Create_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *created
)
{
110978: 55 push %ebp
110979: 89 e5 mov %esp,%ebp
11097b: 57 push %edi
11097c: 56 push %esi
11097d: 53 push %ebx
11097e: 83 ec 28 sub $0x28,%esp
110981: 8b 55 0c mov 0xc(%ebp),%edx
POSIX_API_Control *api;
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
110984: 68 f0 00 00 00 push $0xf0
110989: 89 55 e4 mov %edx,-0x1c(%ebp)
11098c: e8 53 e0 ff ff call 10e9e4 <_Workspace_Allocate>
110991: 89 c3 mov %eax,%ebx
if ( !api )
110993: 83 c4 10 add $0x10,%esp
110996: 85 c0 test %eax,%eax
110998: 8b 55 e4 mov -0x1c(%ebp),%edx
11099b: 0f 84 2f 01 00 00 je 110ad0 <_POSIX_Threads_Create_extension+0x158><== NEVER TAKEN
return false;
created->API_Extensions[ THREAD_API_POSIX ] = api;
1109a1: 89 82 ec 00 00 00 mov %eax,0xec(%edx)
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
1109a7: b9 40 00 00 00 mov $0x40,%ecx
1109ac: 31 c0 xor %eax,%eax
1109ae: 89 df mov %ebx,%edi
1109b0: f3 aa rep stos %al,%es:(%edi)
1109b2: c7 03 01 00 00 00 movl $0x1,(%ebx)
1109b8: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
1109bf: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx)
1109c6: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx)
1109cd: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx)
1109d4: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx)
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
1109db: c7 43 40 01 00 00 00 movl $0x1,0x40(%ebx)
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
1109e2: c7 83 84 00 00 00 01 movl $0x1,0x84(%ebx)
1109e9: 00 00 00
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
1109ec: be 38 1c 12 00 mov $0x121c38,%esi
1109f1: 8d bb 88 00 00 00 lea 0x88(%ebx),%edi
1109f7: b1 07 mov $0x7,%cl
1109f9: 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);
1109fb: 0f b6 05 34 3b 12 00 movzbl 0x123b34,%eax
110a02: 2b 42 14 sub 0x14(%edx),%eax
110a05: 89 83 88 00 00 00 mov %eax,0x88(%ebx)
_POSIX_Priority_From_core( created->current_priority );
/*
* POSIX 1003.1 1996, 18.2.2.2
*/
api->cancelation_requested = 0;
110a0b: c7 83 e0 00 00 00 00 movl $0x0,0xe0(%ebx)
110a12: 00 00 00
api->cancelability_state = PTHREAD_CANCEL_ENABLE;
110a15: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx)
110a1c: 00 00 00
api->cancelability_type = PTHREAD_CANCEL_DEFERRED;
110a1f: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx)
110a26: 00 00 00
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
110a29: 8d 83 e8 00 00 00 lea 0xe8(%ebx),%eax
110a2f: 89 83 e4 00 00 00 mov %eax,0xe4(%ebx)
head->next = tail;
head->previous = NULL;
110a35: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
110a3c: 00 00 00
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
110a3f: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax
110a45: 89 83 ec 00 00 00 mov %eax,0xec(%ebx)
*
* The check for class == 1 is debug. Should never really happen.
*/
/* XXX use signal constants */
api->signals_pending = 0;
110a4b: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx)
110a52: 00 00 00
110a55: 0f b6 42 0b movzbl 0xb(%edx),%eax
110a59: 83 e0 07 and $0x7,%eax
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API
110a5c: 83 f8 03 cmp $0x3,%eax
110a5f: 74 53 je 110ab4 <_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;
110a61: c7 83 d0 00 00 00 ff movl $0xffffffff,0xd0(%ebx)
110a68: ff ff ff
}
_Thread_queue_Initialize(
110a6b: 6a 00 push $0x0
110a6d: 68 00 10 00 00 push $0x1000
110a72: 6a 00 push $0x0
110a74: 8d 43 44 lea 0x44(%ebx),%eax
110a77: 50 push %eax
110a78: 89 55 e4 mov %edx,-0x1c(%ebp)
110a7b: e8 98 d6 ff ff call 10e118 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_JOIN_AT_EXIT,
0
);
_Watchdog_Initialize(
110a80: 8b 55 e4 mov -0x1c(%ebp),%edx
110a83: 8b 42 08 mov 0x8(%edx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
110a86: c7 83 b0 00 00 00 00 movl $0x0,0xb0(%ebx)
110a8d: 00 00 00
the_watchdog->routine = routine;
110a90: c7 83 c4 00 00 00 dc movl $0x110adc,0xc4(%ebx)
110a97: 0a 11 00
the_watchdog->id = id;
110a9a: 89 83 c8 00 00 00 mov %eax,0xc8(%ebx)
the_watchdog->user_data = user_data;
110aa0: 89 93 cc 00 00 00 mov %edx,0xcc(%ebx)
_POSIX_Threads_Sporadic_budget_TSR,
created->Object.id,
created
);
return true;
110aa6: 83 c4 10 add $0x10,%esp
110aa9: b0 01 mov $0x1,%al
}
110aab: 8d 65 f4 lea -0xc(%ebp),%esp
110aae: 5b pop %ebx
110aaf: 5e pop %esi
110ab0: 5f pop %edi
110ab1: c9 leave
110ab2: c3 ret
110ab3: 90 nop
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 ];
110ab4: a1 f8 83 12 00 mov 0x1283f8,%eax
api->signals_blocked = executing_api->signals_blocked;
110ab9: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
110abf: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
110ac5: 89 83 d0 00 00 00 mov %eax,0xd0(%ebx)
110acb: eb 9e jmp 110a6b <_POSIX_Threads_Create_extension+0xf3>
110acd: 8d 76 00 lea 0x0(%esi),%esi
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
if ( !api )
return false;
110ad0: 31 c0 xor %eax,%eax
created->Object.id,
created
);
return true;
}
110ad2: 8d 65 f4 lea -0xc(%ebp),%esp
110ad5: 5b pop %ebx
110ad6: 5e pop %esi
110ad7: 5f pop %edi
110ad8: c9 leave
110ad9: c3 ret
001108f0 <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
1108f0: 55 push %ebp
1108f1: 89 e5 mov %esp,%ebp
1108f3: 57 push %edi
1108f4: 56 push %esi
1108f5: 53 push %ebx
1108f6: 83 ec 28 sub $0x28,%esp
1108f9: 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 ];
1108fc: 8b 87 ec 00 00 00 mov 0xec(%edi),%eax
110902: 89 45 e4 mov %eax,-0x1c(%ebp)
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
110905: 57 push %edi
110906: e8 11 22 00 00 call 112b1c <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
11090b: 89 3c 24 mov %edi,(%esp)
11090e: e8 71 22 00 00 call 112b84 <_POSIX_Keys_Run_destructors>
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
110913: 8b 77 28 mov 0x28(%edi),%esi
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
110916: 83 c4 10 add $0x10,%esp
110919: 8b 45 e4 mov -0x1c(%ebp),%eax
11091c: 8d 58 44 lea 0x44(%eax),%ebx
11091f: eb 08 jmp 110929 <_POSIX_Threads_Delete_extension+0x39>
110921: 8d 76 00 lea 0x0(%esi),%esi
*(void **)the_thread->Wait.return_argument = value_ptr;
110924: 8b 40 28 mov 0x28(%eax),%eax
110927: 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 )) )
110929: 83 ec 0c sub $0xc,%esp
11092c: 53 push %ebx
11092d: e8 56 d4 ff ff call 10dd88 <_Thread_queue_Dequeue>
110932: 83 c4 10 add $0x10,%esp
110935: 85 c0 test %eax,%eax
110937: 75 eb jne 110924 <_POSIX_Threads_Delete_extension+0x34>
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
110939: 8b 45 e4 mov -0x1c(%ebp),%eax
11093c: 83 b8 84 00 00 00 04 cmpl $0x4,0x84(%eax)
110943: 74 1f je 110964 <_POSIX_Threads_Delete_extension+0x74>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
110945: c7 87 ec 00 00 00 00 movl $0x0,0xec(%edi)
11094c: 00 00 00
_Workspace_Free( api );
11094f: 8b 45 e4 mov -0x1c(%ebp),%eax
110952: 89 45 08 mov %eax,0x8(%ebp)
}
110955: 8d 65 f4 lea -0xc(%ebp),%esp
110958: 5b pop %ebx
110959: 5e pop %esi
11095a: 5f pop %edi
11095b: c9 leave
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
_Workspace_Free( api );
11095c: e9 9f e0 ff ff jmp 10ea00 <_Workspace_Free>
110961: 8d 76 00 lea 0x0(%esi),%esi
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 );
110964: 83 ec 0c sub $0xc,%esp
110967: 05 a8 00 00 00 add $0xa8,%eax
11096c: 50 push %eax
11096d: e8 4a df ff ff call 10e8bc <_Watchdog_Remove>
110972: 83 c4 10 add $0x10,%esp
110975: eb ce jmp 110945 <_POSIX_Threads_Delete_extension+0x55>
001108b4 <_POSIX_Threads_Initialize_user_threads>:
*
* This routine creates and starts all configured user
* initialzation threads.
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
1108b4: 55 push %ebp
1108b5: 89 e5 mov %esp,%ebp
1108b7: 83 ec 08 sub $0x8,%esp
if ( _POSIX_Threads_Initialize_user_threads_p )
1108ba: a1 f8 60 12 00 mov 0x1260f8,%eax
1108bf: 85 c0 test %eax,%eax
1108c1: 74 05 je 1108c8 <_POSIX_Threads_Initialize_user_threads+0x14>
(*_POSIX_Threads_Initialize_user_threads_p)();
}
1108c3: c9 leave
* initialzation threads.
*/
void _POSIX_Threads_Initialize_user_threads( void )
{
if ( _POSIX_Threads_Initialize_user_threads_p )
(*_POSIX_Threads_Initialize_user_threads_p)();
1108c4: ff e0 jmp *%eax
1108c6: 66 90 xchg %ax,%ax
}
1108c8: c9 leave
1108c9: c3 ret
0010ba3c <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
10ba3c: 55 push %ebp
10ba3d: 89 e5 mov %esp,%ebp
10ba3f: 57 push %edi
10ba40: 56 push %esi
10ba41: 53 push %ebx
10ba42: 83 ec 6c sub $0x6c,%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;
10ba45: 8b 3d 34 4e 12 00 mov 0x124e34,%edi
maximum = Configuration_POSIX_API.number_of_initialization_threads;
10ba4b: a1 30 4e 12 00 mov 0x124e30,%eax
10ba50: 89 45 94 mov %eax,-0x6c(%ebp)
if ( !user_threads || maximum == 0 )
10ba53: 85 ff test %edi,%edi
10ba55: 74 44 je 10ba9b <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN
10ba57: 85 c0 test %eax,%eax
10ba59: 74 40 je 10ba9b <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN
10ba5b: 31 db xor %ebx,%ebx
10ba5d: 8d 75 a4 lea -0x5c(%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 );
10ba60: 83 ec 0c sub $0xc,%esp
10ba63: 56 push %esi
10ba64: e8 37 61 00 00 call 111ba0 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
10ba69: 5a pop %edx
10ba6a: 59 pop %ecx
10ba6b: 6a 02 push $0x2
10ba6d: 56 push %esi
10ba6e: e8 59 61 00 00 call 111bcc <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
10ba73: 59 pop %ecx
10ba74: 58 pop %eax
10ba75: ff 74 df 04 pushl 0x4(%edi,%ebx,8)
10ba79: 56 push %esi
10ba7a: e8 81 61 00 00 call 111c00 <pthread_attr_setstacksize>
status = pthread_create(
10ba7f: 6a 00 push $0x0
10ba81: ff 34 df pushl (%edi,%ebx,8)
10ba84: 56 push %esi
10ba85: 8d 45 e4 lea -0x1c(%ebp),%eax
10ba88: 50 push %eax
10ba89: e8 92 fc ff ff call 10b720 <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
10ba8e: 83 c4 20 add $0x20,%esp
10ba91: 85 c0 test %eax,%eax
10ba93: 75 0e jne 10baa3 <_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++ ) {
10ba95: 43 inc %ebx
10ba96: 39 5d 94 cmp %ebx,-0x6c(%ebp)
10ba99: 77 c5 ja 10ba60 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
10ba9b: 8d 65 f4 lea -0xc(%ebp),%esp
10ba9e: 5b pop %ebx
10ba9f: 5e pop %esi
10baa0: 5f pop %edi
10baa1: c9 leave
10baa2: c3 ret
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
10baa3: 52 push %edx
10baa4: 50 push %eax
10baa5: 6a 01 push $0x1
10baa7: 6a 02 push $0x2
10baa9: e8 c2 1e 00 00 call 10d970 <_Internal_error_Occurred>
00110adc <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
110adc: 55 push %ebp
110add: 89 e5 mov %esp,%ebp
110adf: 56 push %esi
110ae0: 53 push %ebx
110ae1: 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 ];
110ae4: 8b 9e ec 00 00 00 mov 0xec(%esi),%ebx
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
110aea: 83 ec 0c sub $0xc,%esp
110aed: 8d 83 98 00 00 00 lea 0x98(%ebx),%eax
110af3: 50 push %eax
110af4: e8 93 0e 00 00 call 11198c <_Timespec_To_ticks>
the_thread->cpu_time_budget = ticks;
110af9: 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);
110afc: 0f b6 05 34 3b 12 00 movzbl 0x123b34,%eax
110b03: 2b 83 88 00 00 00 sub 0x88(%ebx),%eax
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
110b09: 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 ) {
110b0c: 83 c4 10 add $0x10,%esp
110b0f: 8b 4e 1c mov 0x1c(%esi),%ecx
110b12: 85 c9 test %ecx,%ecx
110b14: 75 05 jne 110b1b <_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 ) {
110b16: 39 46 14 cmp %eax,0x14(%esi)
110b19: 77 35 ja 110b50 <_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 );
110b1b: 83 ec 0c sub $0xc,%esp
110b1e: 8d 83 90 00 00 00 lea 0x90(%ebx),%eax
110b24: 50 push %eax
110b25: e8 62 0e 00 00 call 11198c <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
110b2a: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
110b30: 83 c4 10 add $0x10,%esp
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
110b33: 81 c3 a8 00 00 00 add $0xa8,%ebx
110b39: 89 5d 0c mov %ebx,0xc(%ebp)
110b3c: c7 45 08 20 7f 12 00 movl $0x127f20,0x8(%ebp)
}
110b43: 8d 65 f8 lea -0x8(%ebp),%esp
110b46: 5b pop %ebx
110b47: 5e pop %esi
110b48: c9 leave
110b49: e9 2e dc ff ff jmp 10e77c <_Watchdog_Insert>
110b4e: 66 90 xchg %ax,%ax
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 );
110b50: 52 push %edx
110b51: 6a 01 push $0x1
110b53: 50 push %eax
110b54: 56 push %esi
110b55: e8 76 ca ff ff call 10d5d0 <_Thread_Change_priority>
110b5a: 83 c4 10 add $0x10,%esp
110b5d: eb bc jmp 110b1b <_POSIX_Threads_Sporadic_budget_TSR+0x3f>
00110b60 <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
110b60: 55 push %ebp
110b61: 89 e5 mov %esp,%ebp
110b63: 83 ec 08 sub $0x8,%esp
110b66: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
110b69: 8b 88 ec 00 00 00 mov 0xec(%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 */
110b6f: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax)
110b76: 0f b6 15 34 3b 12 00 movzbl 0x123b34,%edx
110b7d: 2b 91 8c 00 00 00 sub 0x8c(%ecx),%edx
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
110b83: 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 ) {
110b86: 8b 48 1c mov 0x1c(%eax),%ecx
110b89: 85 c9 test %ecx,%ecx
110b8b: 75 05 jne 110b92 <_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 ) {
110b8d: 39 50 14 cmp %edx,0x14(%eax)
110b90: 72 02 jb 110b94 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN
#if 0
printk( "lower priority\n" );
#endif
}
}
}
110b92: c9 leave <== NOT EXECUTED
110b93: 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 );
110b94: 51 push %ecx
110b95: 6a 01 push $0x1
110b97: 52 push %edx
110b98: 50 push %eax
110b99: e8 32 ca ff ff call 10d5d0 <_Thread_Change_priority>
110b9e: 83 c4 10 add $0x10,%esp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
110ba1: c9 leave
110ba2: c3 ret
00112b1c <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
112b1c: 55 push %ebp
112b1d: 89 e5 mov %esp,%ebp
112b1f: 57 push %edi
112b20: 56 push %esi
112b21: 53 push %ebx
112b22: 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 ];
112b25: 8b 45 08 mov 0x8(%ebp),%eax
112b28: 8b b0 ec 00 00 00 mov 0xec(%eax),%esi
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
112b2e: c7 86 d8 00 00 00 01 movl $0x1,0xd8(%esi)
112b35: 00 00 00
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
112b38: 8d be e8 00 00 00 lea 0xe8(%esi),%edi
while ( !_Chain_Is_empty( handler_stack ) ) {
112b3e: 39 be e4 00 00 00 cmp %edi,0xe4(%esi)
112b44: 74 33 je 112b79 <_POSIX_Threads_cancel_run+0x5d>
112b46: 66 90 xchg %ax,%ax
_ISR_Disable( level );
112b48: 9c pushf
112b49: fa cli
112b4a: 59 pop %ecx
handler = (POSIX_Cancel_Handler_control *)
112b4b: 8b 9e ec 00 00 00 mov 0xec(%esi),%ebx
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
112b51: 8b 13 mov (%ebx),%edx
previous = the_node->previous;
112b53: 8b 43 04 mov 0x4(%ebx),%eax
next->previous = previous;
112b56: 89 42 04 mov %eax,0x4(%edx)
previous->next = next;
112b59: 89 10 mov %edx,(%eax)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
112b5b: 51 push %ecx
112b5c: 9d popf
(*handler->routine)( handler->arg );
112b5d: 83 ec 0c sub $0xc,%esp
112b60: ff 73 0c pushl 0xc(%ebx)
112b63: ff 53 08 call *0x8(%ebx)
_Workspace_Free( handler );
112b66: 89 1c 24 mov %ebx,(%esp)
112b69: e8 92 be ff ff call 10ea00 <_Workspace_Free>
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
112b6e: 83 c4 10 add $0x10,%esp
112b71: 39 be e4 00 00 00 cmp %edi,0xe4(%esi)
112b77: 75 cf jne 112b48 <_POSIX_Threads_cancel_run+0x2c><== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
112b79: 8d 65 f4 lea -0xc(%ebp),%esp
112b7c: 5b pop %ebx
112b7d: 5e pop %esi
112b7e: 5f pop %edi
112b7f: c9 leave
112b80: c3 ret
001118b8 <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
1118b8: 55 push %ebp
1118b9: 89 e5 mov %esp,%ebp
1118bb: 56 push %esi
1118bc: 53 push %ebx
1118bd: 8b 5d 08 mov 0x8(%ebp),%ebx
ISR_Level level;
(void) _Watchdog_Remove( timer );
1118c0: 83 ec 0c sub $0xc,%esp
1118c3: 53 push %ebx
1118c4: e8 03 db ff ff call 10f3cc <_Watchdog_Remove>
_ISR_Disable( level );
1118c9: 9c pushf
1118ca: fa cli
1118cb: 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 ) {
1118cc: 83 c4 10 add $0x10,%esp
1118cf: 8b 43 08 mov 0x8(%ebx),%eax
1118d2: 85 c0 test %eax,%eax
1118d4: 74 0e je 1118e4 <_POSIX_Timer_Insert_helper+0x2c>
_ISR_Enable( level );
1118d6: 56 push %esi
1118d7: 9d popf
return false;
1118d8: 31 c0 xor %eax,%eax
*/
_Watchdog_Initialize( timer, TSR, id, arg );
_Watchdog_Insert_ticks( timer, ticks );
_ISR_Enable( level );
return true;
}
1118da: 8d 65 f8 lea -0x8(%ebp),%esp
1118dd: 5b pop %ebx
1118de: 5e pop %esi
1118df: c9 leave
1118e0: c3 ret
1118e1: 8d 76 00 lea 0x0(%esi),%esi
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1118e4: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
the_watchdog->routine = routine;
1118eb: 8b 45 14 mov 0x14(%ebp),%eax
1118ee: 89 43 1c mov %eax,0x1c(%ebx)
the_watchdog->id = id;
1118f1: 8b 45 10 mov 0x10(%ebp),%eax
1118f4: 89 43 20 mov %eax,0x20(%ebx)
the_watchdog->user_data = user_data;
1118f7: 8b 45 18 mov 0x18(%ebp),%eax
1118fa: 89 43 24 mov %eax,0x24(%ebx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
1118fd: 8b 45 0c mov 0xc(%ebp),%eax
111900: 89 43 0c mov %eax,0xc(%ebx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
111903: 83 ec 08 sub $0x8,%esp
111906: 53 push %ebx
111907: 68 60 a2 12 00 push $0x12a260
11190c: e8 7b d9 ff ff call 10f28c <_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 );
111911: 56 push %esi
111912: 9d popf
return true;
111913: 83 c4 10 add $0x10,%esp
111916: b0 01 mov $0x1,%al
}
111918: 8d 65 f8 lea -0x8(%ebp),%esp
11191b: 5b pop %ebx
11191c: 5e pop %esi
11191d: c9 leave
11191e: c3 ret
0010b84c <_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)
{
10b84c: 55 push %ebp
10b84d: 89 e5 mov %esp,%ebp
10b84f: 53 push %ebx
10b850: 83 ec 04 sub $0x4,%esp
10b853: 8b 5d 0c mov 0xc(%ebp),%ebx
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
10b856: ff 43 68 incl 0x68(%ebx)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
10b859: 8b 53 54 mov 0x54(%ebx),%edx
10b85c: 85 d2 test %edx,%edx
10b85e: 75 28 jne 10b888 <_POSIX_Timer_TSR+0x3c>
10b860: 8b 43 58 mov 0x58(%ebx),%eax
10b863: 85 c0 test %eax,%eax
10b865: 75 21 jne 10b888 <_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;
10b867: 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 ) ) {
10b86b: 83 ec 08 sub $0x8,%esp
10b86e: ff 73 44 pushl 0x44(%ebx)
10b871: ff 73 38 pushl 0x38(%ebx)
10b874: e8 d3 5b 00 00 call 11144c <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
10b879: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
10b880: 83 c4 10 add $0x10,%esp
}
10b883: 8b 5d fc mov -0x4(%ebp),%ebx
10b886: c9 leave
10b887: 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(
10b888: 83 ec 0c sub $0xc,%esp
10b88b: 53 push %ebx
10b88c: 68 4c b8 10 00 push $0x10b84c
10b891: ff 73 08 pushl 0x8(%ebx)
10b894: ff 73 64 pushl 0x64(%ebx)
10b897: 8d 43 10 lea 0x10(%ebx),%eax
10b89a: 50 push %eax
10b89b: e8 18 60 00 00 call 1118b8 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
10b8a0: 83 c4 20 add $0x20,%esp
10b8a3: 84 c0 test %al,%al
10b8a5: 74 dc je 10b883 <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
10b8a7: 83 ec 0c sub $0xc,%esp
10b8aa: 8d 43 6c lea 0x6c(%ebx),%eax
10b8ad: 50 push %eax
10b8ae: e8 91 16 00 00 call 10cf44 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10b8b3: c6 43 3c 03 movb $0x3,0x3c(%ebx)
10b8b7: 83 c4 10 add $0x10,%esp
10b8ba: eb af jmp 10b86b <_POSIX_Timer_TSR+0x1f>
00112c08 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
112c08: 55 push %ebp
112c09: 89 e5 mov %esp,%ebp
112c0b: 57 push %edi
112c0c: 56 push %esi
112c0d: 53 push %ebx
112c0e: 83 ec 78 sub $0x78,%esp
112c11: 8b 5d 0c mov 0xc(%ebp),%ebx
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
112c14: 6a 01 push $0x1
112c16: 0f b6 45 10 movzbl 0x10(%ebp),%eax
112c1a: 50 push %eax
112c1b: 8d 55 dc lea -0x24(%ebp),%edx
112c1e: 52 push %edx
112c1f: 53 push %ebx
112c20: ff 75 08 pushl 0x8(%ebp)
112c23: 89 55 9c mov %edx,-0x64(%ebp)
112c26: e8 b5 00 00 00 call 112ce0 <_POSIX_signals_Clear_signals>
112c2b: 83 c4 20 add $0x20,%esp
112c2e: 84 c0 test %al,%al
112c30: 8b 55 9c mov -0x64(%ebp),%edx
112c33: 0f 84 9b 00 00 00 je 112cd4 <_POSIX_signals_Check_signal+0xcc>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
112c39: 8d 04 5b lea (%ebx,%ebx,2),%eax
112c3c: c1 e0 02 shl $0x2,%eax
112c3f: 8b 88 68 84 12 00 mov 0x128468(%eax),%ecx
112c45: 89 4d a4 mov %ecx,-0x5c(%ebp)
112c48: 49 dec %ecx
112c49: 0f 84 85 00 00 00 je 112cd4 <_POSIX_signals_Check_signal+0xcc><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
112c4f: 8b 75 08 mov 0x8(%ebp),%esi
112c52: 8b b6 d0 00 00 00 mov 0xd0(%esi),%esi
112c58: 89 75 a0 mov %esi,-0x60(%ebp)
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
112c5b: 8b 88 64 84 12 00 mov 0x128464(%eax),%ecx
112c61: 09 f1 or %esi,%ecx
112c63: 8b 75 08 mov 0x8(%ebp),%esi
112c66: 89 8e d0 00 00 00 mov %ecx,0xd0(%esi)
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
112c6c: 8d 75 b4 lea -0x4c(%ebp),%esi
112c6f: 89 75 94 mov %esi,-0x6c(%ebp)
112c72: 8b 35 f8 83 12 00 mov 0x1283f8,%esi
112c78: 83 c6 20 add $0x20,%esi
112c7b: b9 0a 00 00 00 mov $0xa,%ecx
112c80: 8b 7d 94 mov -0x6c(%ebp),%edi
112c83: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
112c85: 83 b8 60 84 12 00 02 cmpl $0x2,0x128460(%eax)
112c8c: 74 36 je 112cc4 <_POSIX_signals_Check_signal+0xbc>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
112c8e: 83 ec 0c sub $0xc,%esp
112c91: 53 push %ebx
112c92: ff 55 a4 call *-0x5c(%ebp)
break;
112c95: 83 c4 10 add $0x10,%esp
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
112c98: 8b 3d f8 83 12 00 mov 0x1283f8,%edi
112c9e: 83 c7 20 add $0x20,%edi
112ca1: b9 0a 00 00 00 mov $0xa,%ecx
112ca6: 8b 75 94 mov -0x6c(%ebp),%esi
112ca9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
112cab: 8b 55 a0 mov -0x60(%ebp),%edx
112cae: 8b 45 08 mov 0x8(%ebp),%eax
112cb1: 89 90 d0 00 00 00 mov %edx,0xd0(%eax)
return true;
112cb7: b0 01 mov $0x1,%al
}
112cb9: 8d 65 f4 lea -0xc(%ebp),%esp
112cbc: 5b pop %ebx
112cbd: 5e pop %esi
112cbe: 5f pop %edi
112cbf: c9 leave
112cc0: c3 ret
112cc1: 8d 76 00 lea 0x0(%esi),%esi
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
112cc4: 50 push %eax
112cc5: 6a 00 push $0x0
112cc7: 52 push %edx
112cc8: 53 push %ebx
112cc9: ff 55 a4 call *-0x5c(%ebp)
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
112ccc: 83 c4 10 add $0x10,%esp
112ccf: eb c7 jmp 112c98 <_POSIX_signals_Check_signal+0x90>
112cd1: 8d 76 00 lea 0x0(%esi),%esi
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
return false;
112cd4: 31 c0 xor %eax,%eax
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
}
112cd6: 8d 65 f4 lea -0xc(%ebp),%esp
112cd9: 5b pop %ebx
112cda: 5e pop %esi
112cdb: 5f pop %edi
112cdc: c9 leave
112cdd: c3 ret
00113290 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
113290: 55 push %ebp
113291: 89 e5 mov %esp,%ebp
113293: 53 push %ebx
113294: 8b 4d 08 mov 0x8(%ebp),%ecx
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
113297: 9c pushf
113298: fa cli
113299: 5a pop %edx
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
11329a: 8d 04 49 lea (%ecx,%ecx,2),%eax
11329d: c1 e0 02 shl $0x2,%eax
1132a0: 83 b8 60 84 12 00 02 cmpl $0x2,0x128460(%eax)
1132a7: 74 13 je 1132bc <_POSIX_signals_Clear_process_signals+0x2c>
1132a9: 49 dec %ecx
1132aa: 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;
1132af: d3 c0 rol %cl,%eax
1132b1: 21 05 68 86 12 00 and %eax,0x128668
}
_ISR_Enable( level );
1132b7: 52 push %edx
1132b8: 9d popf
}
1132b9: 5b pop %ebx
1132ba: c9 leave
1132bb: c3 ret
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
1132bc: 8d 98 84 86 12 00 lea 0x128684(%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 ] ) )
1132c2: 39 98 80 86 12 00 cmp %ebx,0x128680(%eax)
1132c8: 75 ed jne 1132b7 <_POSIX_signals_Clear_process_signals+0x27><== NEVER TAKEN
1132ca: eb dd jmp 1132a9 <_POSIX_signals_Clear_process_signals+0x19>
00112ce0 <_POSIX_signals_Clear_signals>:
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
112ce0: 55 push %ebp
112ce1: 89 e5 mov %esp,%ebp
112ce3: 57 push %edi
112ce4: 56 push %esi
112ce5: 53 push %ebx
112ce6: 83 ec 1c sub $0x1c,%esp
112ce9: 8b 5d 0c mov 0xc(%ebp),%ebx
112cec: 0f b6 7d 14 movzbl 0x14(%ebp),%edi
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
112cf0: 8d 4b ff lea -0x1(%ebx),%ecx
112cf3: b8 01 00 00 00 mov $0x1,%eax
112cf8: 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 )
112cfa: 80 7d 18 00 cmpb $0x0,0x18(%ebp)
112cfe: 74 40 je 112d40 <_POSIX_signals_Clear_signals+0x60>
signals_blocked = ~api->signals_blocked;
112d00: 8b 55 08 mov 0x8(%ebp),%edx
112d03: 8b 8a d0 00 00 00 mov 0xd0(%edx),%ecx
112d09: 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 );
112d0b: 9c pushf
112d0c: fa cli
112d0d: 8f 45 e4 popl -0x1c(%ebp)
if ( is_global ) {
112d10: 89 fa mov %edi,%edx
112d12: 84 d2 test %dl,%dl
112d14: 74 32 je 112d48 <_POSIX_signals_Clear_signals+0x68>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
112d16: 23 05 68 86 12 00 and 0x128668,%eax
112d1c: 85 c8 test %ecx,%eax
112d1e: 74 54 je 112d74 <_POSIX_signals_Clear_signals+0x94>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
112d20: 8d 14 5b lea (%ebx,%ebx,2),%edx
112d23: c1 e2 02 shl $0x2,%edx
112d26: 83 ba 60 84 12 00 02 cmpl $0x2,0x128460(%edx)
112d2d: 74 49 je 112d78 <_POSIX_signals_Clear_signals+0x98>
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
112d2f: 83 ec 0c sub $0xc,%esp
112d32: 53 push %ebx
112d33: e8 58 05 00 00 call 113290 <_POSIX_signals_Clear_process_signals>
112d38: 83 c4 10 add $0x10,%esp
do_callout = true;
112d3b: b0 01 mov $0x1,%al
112d3d: eb 26 jmp 112d65 <_POSIX_signals_Clear_signals+0x85>
112d3f: 90 nop
*/
if ( check_blocked )
signals_blocked = ~api->signals_blocked;
else
signals_blocked = SIGNAL_ALL_MASK;
112d40: b9 ff ff ff ff mov $0xffffffff,%ecx
112d45: eb c4 jmp 112d0b <_POSIX_signals_Clear_signals+0x2b>
112d47: 90 nop
}
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
112d48: 8b 55 08 mov 0x8(%ebp),%edx
112d4b: 8b 9a d4 00 00 00 mov 0xd4(%edx),%ebx
112d51: 89 c6 mov %eax,%esi
112d53: 21 de and %ebx,%esi
112d55: 85 ce test %ecx,%esi
112d57: 74 1b je 112d74 <_POSIX_signals_Clear_signals+0x94>
api->signals_pending &= ~mask;
112d59: f7 d0 not %eax
112d5b: 21 d8 and %ebx,%eax
112d5d: 89 82 d4 00 00 00 mov %eax,0xd4(%edx)
do_callout = true;
112d63: b0 01 mov $0x1,%al
}
}
_ISR_Enable( level );
112d65: ff 75 e4 pushl -0x1c(%ebp)
112d68: 9d popf
return do_callout;
}
112d69: 8d 65 f4 lea -0xc(%ebp),%esp
112d6c: 5b pop %ebx
112d6d: 5e pop %esi
112d6e: 5f pop %edi
112d6f: c9 leave
112d70: c3 ret
112d71: 8d 76 00 lea 0x0(%esi),%esi
bool do_callout;
POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo );
do_callout = false;
112d74: 31 c0 xor %eax,%eax
112d76: eb ed jmp 112d65 <_POSIX_signals_Clear_signals+0x85>
do_callout = true;
}
}
_ISR_Enable( level );
return do_callout;
}
112d78: 8d 8a 80 86 12 00 lea 0x128680(%edx),%ecx
112d7e: 8b 82 80 86 12 00 mov 0x128680(%edx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
112d84: 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))
112d87: 39 f0 cmp %esi,%eax
112d89: 74 45 je 112dd0 <_POSIX_signals_Clear_signals+0xf0>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
112d8b: 8b 30 mov (%eax),%esi
head->next = new_first;
112d8d: 89 b2 80 86 12 00 mov %esi,0x128680(%edx)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
112d93: 89 4e 04 mov %ecx,0x4(%esi)
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 );
112d96: 83 ec 0c sub $0xc,%esp
112d99: 53 push %ebx
112d9a: 89 45 e0 mov %eax,-0x20(%ebp)
112d9d: e8 ee 04 00 00 call 113290 <_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;
112da2: 8b 45 e0 mov -0x20(%ebp),%eax
112da5: 8d 70 08 lea 0x8(%eax),%esi
112da8: b9 03 00 00 00 mov $0x3,%ecx
112dad: 8b 7d 10 mov 0x10(%ebp),%edi
112db0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
112db2: 8b 15 e8 85 12 00 mov 0x1285e8,%edx
the_node->next = tail;
112db8: c7 00 e4 85 12 00 movl $0x1285e4,(%eax)
tail->previous = the_node;
112dbe: a3 e8 85 12 00 mov %eax,0x1285e8
old_last->next = the_node;
112dc3: 89 02 mov %eax,(%edx)
the_node->previous = old_last;
112dc5: 89 50 04 mov %edx,0x4(%eax)
112dc8: 83 c4 10 add $0x10,%esp
112dcb: e9 5f ff ff ff jmp 112d2f <_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 );
112dd0: 83 ec 0c sub $0xc,%esp
112dd3: 53 push %ebx
112dd4: e8 b7 04 00 00 call 113290 <_POSIX_signals_Clear_process_signals>
112dd9: 83 c4 10 add $0x10,%esp
112ddc: e9 4e ff ff ff jmp 112d2f <_POSIX_signals_Clear_signals+0x4f>
0010c120 <_POSIX_signals_Get_lowest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
sigset_t set
)
{
10c120: 55 push %ebp
10c121: 89 e5 mov %esp,%ebp
10c123: 56 push %esi
10c124: 53 push %ebx
10c125: 8b 55 08 mov 0x8(%ebp),%edx
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10c128: b8 1b 00 00 00 mov $0x1b,%eax
10c12d: 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_lowest(
10c132: 8d 48 ff lea -0x1(%eax),%ecx
10c135: 89 de mov %ebx,%esi
10c137: d3 e6 shl %cl,%esi
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
10c139: 85 d6 test %edx,%esi
10c13b: 75 20 jne 10c15d <_POSIX_signals_Get_lowest+0x3d><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
10c13d: 40 inc %eax
10c13e: 83 f8 20 cmp $0x20,%eax
10c141: 75 ef jne 10c132 <_POSIX_signals_Get_lowest+0x12>
10c143: b0 01 mov $0x1,%al
10c145: bb 01 00 00 00 mov $0x1,%ebx
10c14a: eb 06 jmp 10c152 <_POSIX_signals_Get_lowest+0x32>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
10c14c: 40 inc %eax
10c14d: 83 f8 1b cmp $0x1b,%eax
10c150: 74 0b je 10c15d <_POSIX_signals_Get_lowest+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_lowest(
10c152: 8d 48 ff lea -0x1(%eax),%ecx
10c155: 89 de mov %ebx,%esi
10c157: 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 ) ) {
10c159: 85 d6 test %edx,%esi
10c15b: 74 ef je 10c14c <_POSIX_signals_Get_lowest+0x2c>
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
10c15d: 5b pop %ebx
10c15e: 5e pop %esi
10c15f: c9 leave
10c160: c3 ret
00124cdc <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
124cdc: 55 push %ebp
124cdd: 89 e5 mov %esp,%ebp
124cdf: 57 push %edi
124ce0: 56 push %esi
124ce1: 53 push %ebx
124ce2: 83 ec 0c sub $0xc,%esp
124ce5: 8b 5d 08 mov 0x8(%ebp),%ebx
124ce8: 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 ];
124ceb: 8b b3 ec 00 00 00 mov 0xec(%ebx),%esi
124cf1: 8d 4a ff lea -0x1(%edx),%ecx
124cf4: b8 01 00 00 00 mov $0x1,%eax
124cf9: d3 e0 shl %cl,%eax
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
124cfb: 8b 4b 10 mov 0x10(%ebx),%ecx
124cfe: 89 cf mov %ecx,%edi
124d00: 81 e7 00 80 00 10 and $0x10008000,%edi
124d06: 81 ff 00 80 00 10 cmp $0x10008000,%edi
124d0c: 74 72 je 124d80 <_POSIX_signals_Unblock_thread+0xa4>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
124d0e: 8b 96 d0 00 00 00 mov 0xd0(%esi),%edx
124d14: f7 d2 not %edx
124d16: 85 d0 test %edx,%eax
124d18: 74 5a je 124d74 <_POSIX_signals_Unblock_thread+0x98>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
124d1a: f7 c1 00 00 00 10 test $0x10000000,%ecx
124d20: 74 3a je 124d5c <_POSIX_signals_Unblock_thread+0x80>
the_thread->Wait.return_code = EINTR;
124d22: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
124d29: f7 c1 e0 be 03 00 test $0x3bee0,%ecx
124d2f: 0f 85 93 00 00 00 jne 124dc8 <_POSIX_signals_Unblock_thread+0xec>
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
124d35: 83 e1 08 and $0x8,%ecx
124d38: 74 3a je 124d74 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
124d3a: 83 ec 0c sub $0xc,%esp
124d3d: 8d 43 48 lea 0x48(%ebx),%eax
124d40: 50 push %eax
124d41: e8 9e ec fe ff call 1139e4 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
124d46: 5a pop %edx
124d47: 59 pop %ecx
124d48: 68 f8 ff 03 10 push $0x1003fff8
124d4d: 53 push %ebx
124d4e: e8 79 da fe ff call 1127cc <_Thread_Clear_state>
124d53: 83 c4 10 add $0x10,%esp
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
124d56: 31 c0 xor %eax,%eax
124d58: eb 1c jmp 124d76 <_POSIX_signals_Unblock_thread+0x9a>
124d5a: 66 90 xchg %ax,%ax
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
124d5c: 85 c9 test %ecx,%ecx
124d5e: 75 14 jne 124d74 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
124d60: a1 74 f1 12 00 mov 0x12f174,%eax
124d65: 85 c0 test %eax,%eax
124d67: 74 0b je 124d74 <_POSIX_signals_Unblock_thread+0x98>
124d69: 3b 1d 78 f1 12 00 cmp 0x12f178,%ebx
124d6f: 74 7b je 124dec <_POSIX_signals_Unblock_thread+0x110><== ALWAYS TAKEN
124d71: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Dispatch_necessary = true;
}
}
return false;
124d74: 31 c0 xor %eax,%eax
}
124d76: 8d 65 f4 lea -0xc(%ebp),%esp
124d79: 5b pop %ebx
124d7a: 5e pop %esi
124d7b: 5f pop %edi
124d7c: c9 leave
124d7d: c3 ret
124d7e: 66 90 xchg %ax,%ax
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
124d80: 85 43 30 test %eax,0x30(%ebx)
124d83: 74 33 je 124db8 <_POSIX_signals_Unblock_thread+0xdc>
the_thread->Wait.return_code = EINTR;
124d85: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
124d8c: 8b 43 28 mov 0x28(%ebx),%eax
if ( !info ) {
124d8f: 8b 75 10 mov 0x10(%ebp),%esi
124d92: 85 f6 test %esi,%esi
124d94: 74 42 je 124dd8 <_POSIX_signals_Unblock_thread+0xfc>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
124d96: b9 03 00 00 00 mov $0x3,%ecx
124d9b: 89 c7 mov %eax,%edi
124d9d: 8b 75 10 mov 0x10(%ebp),%esi
124da0: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
_Thread_queue_Extract_with_proxy( the_thread );
124da2: 83 ec 0c sub $0xc,%esp
124da5: 53 push %ebx
124da6: e8 3d e4 fe ff call 1131e8 <_Thread_queue_Extract_with_proxy>
return true;
124dab: 83 c4 10 add $0x10,%esp
124dae: b0 01 mov $0x1,%al
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
124db0: 8d 65 f4 lea -0xc(%ebp),%esp
124db3: 5b pop %ebx
124db4: 5e pop %esi
124db5: 5f pop %edi
124db6: c9 leave
124db7: 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) ) {
124db8: 8b 8e d0 00 00 00 mov 0xd0(%esi),%ecx
124dbe: f7 d1 not %ecx
124dc0: 85 c8 test %ecx,%eax
124dc2: 75 c1 jne 124d85 <_POSIX_signals_Unblock_thread+0xa9>
124dc4: eb ae jmp 124d74 <_POSIX_signals_Unblock_thread+0x98>
124dc6: 66 90 xchg %ax,%ax
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
124dc8: 83 ec 0c sub $0xc,%esp
124dcb: 53 push %ebx
124dcc: e8 17 e4 fe ff call 1131e8 <_Thread_queue_Extract_with_proxy>
124dd1: 83 c4 10 add $0x10,%esp
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
124dd4: 31 c0 xor %eax,%eax
124dd6: eb 9e jmp 124d76 <_POSIX_signals_Unblock_thread+0x9a>
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
124dd8: 89 10 mov %edx,(%eax)
the_info->si_code = SI_USER;
124dda: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax)
the_info->si_value.sival_int = 0;
124de1: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
124de8: eb b8 jmp 124da2 <_POSIX_signals_Unblock_thread+0xc6>
124dea: 66 90 xchg %ax,%ax
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
124dec: c6 05 84 f1 12 00 01 movb $0x1,0x12f184
}
}
return false;
124df3: 31 c0 xor %eax,%eax
124df5: e9 7c ff ff ff jmp 124d76 <_POSIX_signals_Unblock_thread+0x9a>
0010d8a0 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
10d8a0: 55 push %ebp
10d8a1: 89 e5 mov %esp,%ebp
10d8a3: 56 push %esi
10d8a4: 53 push %ebx
10d8a5: 8b 5d 08 mov 0x8(%ebp),%ebx
10d8a8: 8b 75 0c mov 0xc(%ebp),%esi
if ( !the_heap )
10d8ab: 85 db test %ebx,%ebx
10d8ad: 74 35 je 10d8e4 <_Protected_heap_Get_information+0x44>
return false;
if ( !the_info )
10d8af: 85 f6 test %esi,%esi
10d8b1: 74 31 je 10d8e4 <_Protected_heap_Get_information+0x44>
return false;
_RTEMS_Lock_allocator();
10d8b3: 83 ec 0c sub $0xc,%esp
10d8b6: ff 35 00 89 12 00 pushl 0x128900
10d8bc: e8 d7 ed ff ff call 10c698 <_API_Mutex_Lock>
_Heap_Get_information( the_heap, the_info );
10d8c1: 5a pop %edx
10d8c2: 59 pop %ecx
10d8c3: 56 push %esi
10d8c4: 53 push %ebx
10d8c5: e8 ee 47 00 00 call 1120b8 <_Heap_Get_information>
_RTEMS_Unlock_allocator();
10d8ca: 58 pop %eax
10d8cb: ff 35 00 89 12 00 pushl 0x128900
10d8d1: e8 0a ee ff ff call 10c6e0 <_API_Mutex_Unlock>
return true;
10d8d6: 83 c4 10 add $0x10,%esp
10d8d9: b0 01 mov $0x1,%al
}
10d8db: 8d 65 f8 lea -0x8(%ebp),%esp
10d8de: 5b pop %ebx
10d8df: 5e pop %esi
10d8e0: c9 leave
10d8e1: c3 ret
10d8e2: 66 90 xchg %ax,%ax
{
if ( !the_heap )
return false;
if ( !the_info )
return false;
10d8e4: 31 c0 xor %eax,%eax
_RTEMS_Lock_allocator();
_Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
return true;
}
10d8e6: 8d 65 f8 lea -0x8(%ebp),%esp
10d8e9: 5b pop %ebx
10d8ea: 5e pop %esi
10d8eb: c9 leave
10d8ec: c3 ret
00110cd0 <_Protected_heap_Walk>:
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
110cd0: 55 push %ebp
110cd1: 89 e5 mov %esp,%ebp
110cd3: 56 push %esi
110cd4: 53 push %ebx
110cd5: 83 ec 10 sub $0x10,%esp
110cd8: 8b 5d 08 mov 0x8(%ebp),%ebx
110cdb: 8b 75 0c mov 0xc(%ebp),%esi
110cde: 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 ) {
110ce1: 8b 15 b0 ee 12 00 mov 0x12eeb0,%edx
110ce7: 85 d2 test %edx,%edx
110ce9: 74 19 je 110d04 <_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 );
110ceb: 0f b6 c0 movzbl %al,%eax
110cee: 89 45 10 mov %eax,0x10(%ebp)
110cf1: 89 75 0c mov %esi,0xc(%ebp)
110cf4: 89 5d 08 mov %ebx,0x8(%ebp)
}
return status;
}
110cf7: 8d 65 f8 lea -0x8(%ebp),%esp
110cfa: 5b pop %ebx
110cfb: 5e pop %esi
110cfc: 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 );
110cfd: e9 22 f2 ff ff jmp 10ff24 <_Heap_Walk>
110d02: 66 90 xchg %ax,%ax
* 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();
110d04: 83 ec 0c sub $0xc,%esp
110d07: ff 35 60 ef 12 00 pushl 0x12ef60
110d0d: 88 45 f4 mov %al,-0xc(%ebp)
110d10: e8 9b e3 ff ff call 10f0b0 <_API_Mutex_Lock>
status = _Heap_Walk( the_heap, source, do_dump );
110d15: 83 c4 0c add $0xc,%esp
110d18: 8a 45 f4 mov -0xc(%ebp),%al
110d1b: 0f b6 c0 movzbl %al,%eax
110d1e: 50 push %eax
110d1f: 56 push %esi
110d20: 53 push %ebx
110d21: e8 fe f1 ff ff call 10ff24 <_Heap_Walk>
_RTEMS_Unlock_allocator();
110d26: 5a pop %edx
110d27: ff 35 60 ef 12 00 pushl 0x12ef60
110d2d: 88 45 f4 mov %al,-0xc(%ebp)
110d30: e8 c3 e3 ff ff call 10f0f8 <_API_Mutex_Unlock>
110d35: 83 c4 10 add $0x10,%esp
} else {
status = _Heap_Walk( the_heap, source, do_dump );
}
return status;
}
110d38: 8a 45 f4 mov -0xc(%ebp),%al
110d3b: 8d 65 f8 lea -0x8(%ebp),%esp
110d3e: 5b pop %ebx
110d3f: 5e pop %esi
110d40: c9 leave
110d41: c3 ret
00110ef4 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
110ef4: 55 push %ebp
110ef5: 89 e5 mov %esp,%ebp
110ef7: 53 push %ebx
110ef8: 83 ec 10 sub $0x10,%esp
110efb: 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 );
110efe: 80 3d 04 3b 12 00 01 cmpb $0x1,0x123b04
110f05: 19 c0 sbb %eax,%eax
110f07: 83 e0 c0 and $0xffffffc0,%eax
110f0a: 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 );
110f0d: 50 push %eax
110f0e: e8 d1 da ff ff call 10e9e4 <_Workspace_Allocate>
if ( !api )
110f13: 83 c4 10 add $0x10,%esp
110f16: 85 c0 test %eax,%eax
110f18: 74 6a je 110f84 <_RTEMS_tasks_Create_extension+0x90>
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
110f1a: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx)
api->pending_events = EVENT_SETS_NONE_PENDING;
110f20: c7 00 00 00 00 00 movl $0x0,(%eax)
api->event_condition = 0;
110f26: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
110f2d: c6 40 08 00 movb $0x0,0x8(%eax)
information->handler = NULL;
110f31: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
information->mode_set = RTEMS_DEFAULT_MODES;
110f38: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
information->signals_posted = 0;
110f3f: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
information->signals_pending = 0;
110f46: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
information->nest_level = 0;
110f4d: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax)
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
110f54: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx)
110f5b: 00 00 00
if ( rtems_configuration_get_notepads_enabled() ) {
110f5e: 80 3d 04 3b 12 00 00 cmpb $0x0,0x123b04
110f65: 74 13 je 110f7a <_RTEMS_tasks_Create_extension+0x86>
110f67: 31 d2 xor %edx,%edx
110f69: 8d 76 00 lea 0x0(%esi),%esi
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
110f6c: c7 44 90 20 00 00 00 movl $0x0,0x20(%eax,%edx,4)
110f73: 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++)
110f74: 42 inc %edx
110f75: 83 fa 10 cmp $0x10,%edx
110f78: 75 f2 jne 110f6c <_RTEMS_tasks_Create_extension+0x78>
api->Notepads[i] = 0;
}
return true;
110f7a: b0 01 mov $0x1,%al
}
110f7c: 8b 5d fc mov -0x4(%ebp),%ebx
110f7f: c9 leave
110f80: c3 ret
110f81: 8d 76 00 lea 0x0(%esi),%esi
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
110f84: 31 c0 xor %eax,%eax
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
110f86: 8b 5d fc mov -0x4(%ebp),%ebx
110f89: c9 leave
110f8a: c3 ret
00110e9c <_RTEMS_tasks_Delete_extension>:
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
110e9c: 55 push %ebp
110e9d: 89 e5 mov %esp,%ebp
110e9f: 56 push %esi
110ea0: 53 push %ebx
110ea1: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
110ea4: 8b 86 f4 00 00 00 mov 0xf4(%esi),%eax
deleted->task_variables = NULL;
110eaa: c7 86 f4 00 00 00 00 movl $0x0,0xf4(%esi)
110eb1: 00 00 00
while (tvp) {
110eb4: 85 c0 test %eax,%eax
110eb6: 75 06 jne 110ebe <_RTEMS_tasks_Delete_extension+0x22>
110eb8: eb 17 jmp 110ed1 <_RTEMS_tasks_Delete_extension+0x35>
110eba: 66 90 xchg %ax,%ax
next = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
tvp = next;
110ebc: 89 d8 mov %ebx,%eax
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
next = (rtems_task_variable_t *)tvp->next;
110ebe: 8b 18 mov (%eax),%ebx
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
110ec0: 83 ec 08 sub $0x8,%esp
110ec3: 50 push %eax
110ec4: 56 push %esi
110ec5: e8 56 01 00 00 call 111020 <_RTEMS_Tasks_Invoke_task_variable_dtor>
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
110eca: 83 c4 10 add $0x10,%esp
110ecd: 85 db test %ebx,%ebx
110ecf: 75 eb jne 110ebc <_RTEMS_tasks_Delete_extension+0x20>
/*
* Free API specific memory
*/
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
110ed1: 83 ec 0c sub $0xc,%esp
110ed4: ff b6 e8 00 00 00 pushl 0xe8(%esi)
110eda: e8 21 db ff ff call 10ea00 <_Workspace_Free>
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
110edf: c7 86 e8 00 00 00 00 movl $0x0,0xe8(%esi)
110ee6: 00 00 00
110ee9: 83 c4 10 add $0x10,%esp
}
110eec: 8d 65 f8 lea -0x8(%ebp),%esp
110eef: 5b pop %ebx
110ef0: 5e pop %esi
110ef1: c9 leave
110ef2: c3 ret
00110e20 <_RTEMS_tasks_Initialize_user_tasks>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
110e20: 55 push %ebp
110e21: 89 e5 mov %esp,%ebp
110e23: 83 ec 08 sub $0x8,%esp
if ( _RTEMS_tasks_Initialize_user_tasks_p )
110e26: a1 80 3b 12 00 mov 0x123b80,%eax
110e2b: 85 c0 test %eax,%eax
110e2d: 74 05 je 110e34 <_RTEMS_tasks_Initialize_user_tasks+0x14>
(*_RTEMS_tasks_Initialize_user_tasks_p)();
}
110e2f: c9 leave
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
if ( _RTEMS_tasks_Initialize_user_tasks_p )
(*_RTEMS_tasks_Initialize_user_tasks_p)();
110e30: ff e0 jmp *%eax
110e32: 66 90 xchg %ax,%ax
}
110e34: c9 leave
110e35: c3 ret
0010bac8 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
10bac8: 55 push %ebp
10bac9: 89 e5 mov %esp,%ebp
10bacb: 57 push %edi
10bacc: 56 push %esi
10bacd: 53 push %ebx
10bace: 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;
10bad1: 8b 1d 2c 3b 12 00 mov 0x123b2c,%ebx
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
10bad7: 8b 3d 28 3b 12 00 mov 0x123b28,%edi
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
10badd: 85 db test %ebx,%ebx
10badf: 74 46 je 10bb27 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10bae1: 85 ff test %edi,%edi
10bae3: 74 42 je 10bb27 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN
10bae5: 31 f6 xor %esi,%esi
10bae7: 90 nop
return_value = rtems_task_create(
10bae8: 83 ec 08 sub $0x8,%esp
10baeb: 8d 45 e4 lea -0x1c(%ebp),%eax
10baee: 50 push %eax
10baef: ff 73 0c pushl 0xc(%ebx)
10baf2: ff 73 14 pushl 0x14(%ebx)
10baf5: ff 73 04 pushl 0x4(%ebx)
10baf8: ff 73 08 pushl 0x8(%ebx)
10bafb: ff 33 pushl (%ebx)
10bafd: e8 92 fd ff ff call 10b894 <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 ) )
10bb02: 83 c4 20 add $0x20,%esp
10bb05: 85 c0 test %eax,%eax
10bb07: 75 26 jne 10bb2f <_RTEMS_tasks_Initialize_user_tasks_body+0x67>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
10bb09: 51 push %ecx
10bb0a: ff 73 18 pushl 0x18(%ebx)
10bb0d: ff 73 10 pushl 0x10(%ebx)
10bb10: ff 75 e4 pushl -0x1c(%ebp)
10bb13: e8 24 00 00 00 call 10bb3c <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
10bb18: 83 c4 10 add $0x10,%esp
10bb1b: 85 c0 test %eax,%eax
10bb1d: 75 10 jne 10bb2f <_RTEMS_tasks_Initialize_user_tasks_body+0x67>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
10bb1f: 46 inc %esi
10bb20: 83 c3 1c add $0x1c,%ebx
10bb23: 39 f7 cmp %esi,%edi
10bb25: 77 c1 ja 10bae8 <_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 );
}
}
10bb27: 8d 65 f4 lea -0xc(%ebp),%esp
10bb2a: 5b pop %ebx
10bb2b: 5e pop %esi
10bb2c: 5f pop %edi
10bb2d: c9 leave
10bb2e: 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 );
10bb2f: 52 push %edx
10bb30: 50 push %eax
10bb31: 6a 01 push $0x1
10bb33: 6a 01 push $0x1
10bb35: e8 02 0e 00 00 call 10c93c <_Internal_error_Occurred>
00110e38 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
110e38: 55 push %ebp
110e39: 89 e5 mov %esp,%ebp
110e3b: 57 push %edi
110e3c: 56 push %esi
110e3d: 53 push %ebx
110e3e: 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 ];
110e41: 8b 45 08 mov 0x8(%ebp),%eax
110e44: 8b 98 e8 00 00 00 mov 0xe8(%eax),%ebx
if ( !api )
110e4a: 85 db test %ebx,%ebx
110e4c: 74 45 je 110e93 <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
110e4e: 9c pushf
110e4f: fa cli
110e50: 58 pop %eax
signal_set = asr->signals_posted;
110e51: 8b 73 14 mov 0x14(%ebx),%esi
asr->signals_posted = 0;
110e54: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
_ISR_Enable( level );
110e5b: 50 push %eax
110e5c: 9d popf
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
110e5d: 85 f6 test %esi,%esi
110e5f: 74 32 je 110e93 <_RTEMS_tasks_Post_switch_extension+0x5b>
return;
asr->nest_level += 1;
110e61: ff 43 1c incl 0x1c(%ebx)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
110e64: 50 push %eax
110e65: 8d 7d e4 lea -0x1c(%ebp),%edi
110e68: 57 push %edi
110e69: 68 ff ff 00 00 push $0xffff
110e6e: ff 73 10 pushl 0x10(%ebx)
110e71: e8 ee 1f 00 00 call 112e64 <rtems_task_mode>
(*asr->handler)( signal_set );
110e76: 89 34 24 mov %esi,(%esp)
110e79: ff 53 0c call *0xc(%ebx)
asr->nest_level -= 1;
110e7c: ff 4b 1c decl 0x1c(%ebx)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
110e7f: 83 c4 0c add $0xc,%esp
110e82: 57 push %edi
110e83: 68 ff ff 00 00 push $0xffff
110e88: ff 75 e4 pushl -0x1c(%ebp)
110e8b: e8 d4 1f 00 00 call 112e64 <rtems_task_mode>
110e90: 83 c4 10 add $0x10,%esp
}
110e93: 8d 65 f4 lea -0xc(%ebp),%esp
110e96: 5b pop %ebx
110e97: 5e pop %esi
110e98: 5f pop %edi
110e99: c9 leave
110e9a: c3 ret
00110dd8 <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
110dd8: 55 push %ebp
110dd9: 89 e5 mov %esp,%ebp
/*
* Per Task Variables
*/
tvp = executing->task_variables;
110ddb: 8b 45 08 mov 0x8(%ebp),%eax
110dde: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
while (tvp) {
110de4: 85 c0 test %eax,%eax
110de6: 74 13 je 110dfb <_RTEMS_tasks_Switch_extension+0x23>
tvp->tval = *tvp->ptr;
110de8: 8b 50 04 mov 0x4(%eax),%edx
110deb: 8b 0a mov (%edx),%ecx
110ded: 89 48 0c mov %ecx,0xc(%eax)
*tvp->ptr = tvp->gval;
110df0: 8b 48 08 mov 0x8(%eax),%ecx
110df3: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
110df5: 8b 00 mov (%eax),%eax
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
110df7: 85 c0 test %eax,%eax
110df9: 75 ed jne 110de8 <_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;
110dfb: 8b 45 0c mov 0xc(%ebp),%eax
110dfe: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
while (tvp) {
110e04: 85 c0 test %eax,%eax
110e06: 74 13 je 110e1b <_RTEMS_tasks_Switch_extension+0x43>
tvp->gval = *tvp->ptr;
110e08: 8b 50 04 mov 0x4(%eax),%edx
110e0b: 8b 0a mov (%edx),%ecx
110e0d: 89 48 08 mov %ecx,0x8(%eax)
*tvp->ptr = tvp->tval;
110e10: 8b 48 0c mov 0xc(%eax),%ecx
110e13: 89 0a mov %ecx,(%edx)
tvp = (rtems_task_variable_t *)tvp->next;
110e15: 8b 00 mov (%eax),%eax
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
110e17: 85 c0 test %eax,%eax
110e19: 75 ed jne 110e08 <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
110e1b: c9 leave
110e1c: c3 ret
0010c538 <_Rate_monotonic_Initiate_statistics>:
}
void _Rate_monotonic_Initiate_statistics(
Rate_monotonic_Control *the_period
)
{
10c538: 55 push %ebp
10c539: 89 e5 mov %esp,%ebp
10c53b: 57 push %edi
10c53c: 56 push %esi
10c53d: 53 push %ebx
10c53e: 83 ec 28 sub $0x28,%esp
10c541: 8b 5d 08 mov 0x8(%ebp),%ebx
Thread_Control *owning_thread = the_period->owner;
10c544: 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 );
10c547: 8d 7d e0 lea -0x20(%ebp),%edi
10c54a: 57 push %edi
10c54b: e8 98 18 00 00 call 10dde8 <_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;
10c550: 8b 45 e0 mov -0x20(%ebp),%eax
10c553: 8b 55 e4 mov -0x1c(%ebp),%edx
10c556: 89 43 4c mov %eax,0x4c(%ebx)
10c559: 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;
10c55c: 8b 86 84 00 00 00 mov 0x84(%esi),%eax
10c562: 8b 96 88 00 00 00 mov 0x88(%esi),%edx
10c568: 89 43 44 mov %eax,0x44(%ebx)
10c56b: 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) {
10c56e: 83 c4 10 add $0x10,%esp
10c571: 39 35 98 b7 12 00 cmp %esi,0x12b798
10c577: 74 0b je 10c584 <_Rate_monotonic_Initiate_statistics+0x4c>
);
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
}
#endif
}
10c579: 8d 65 f4 lea -0xc(%ebp),%esp
10c57c: 5b pop %ebx
10c57d: 5e pop %esi
10c57e: 5f pop %edi
10c57f: c9 leave
10c580: c3 ret
10c581: 8d 76 00 lea 0x0(%esi),%esi
/*
* Adjust the CPU time used to account for the time since last
* context switch.
*/
_Timespec_Subtract(
10c584: 50 push %eax
&_Thread_Time_of_last_context_switch, &uptime, &ran
10c585: 8d 75 d8 lea -0x28(%ebp),%esi
/*
* Adjust the CPU time used to account for the time since last
* context switch.
*/
_Timespec_Subtract(
10c588: 56 push %esi
10c589: 57 push %edi
10c58a: 68 ac b2 12 00 push $0x12b2ac
10c58f: e8 04 3a 00 00 call 10ff98 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &ran
);
_Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran );
10c594: 59 pop %ecx
10c595: 5f pop %edi
10c596: 56 push %esi
10c597: 83 c3 44 add $0x44,%ebx
10c59a: 53 push %ebx
10c59b: e8 fc 38 00 00 call 10fe9c <_Timespec_Add_to>
10c5a0: 83 c4 10 add $0x10,%esp
}
#endif
}
10c5a3: 8d 65 f4 lea -0xc(%ebp),%esp
10c5a6: 5b pop %ebx
10c5a7: 5e pop %esi
10c5a8: 5f pop %edi
10c5a9: c9 leave
10c5aa: c3 ret
0010caf4 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
10caf4: 55 push %ebp
10caf5: 89 e5 mov %esp,%ebp
10caf7: 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 );
10cafa: 8d 45 f4 lea -0xc(%ebp),%eax
10cafd: 50 push %eax
10cafe: ff 75 08 pushl 0x8(%ebp)
10cb01: 68 00 b1 12 00 push $0x12b100
10cb06: e8 71 1d 00 00 call 10e87c <_Objects_Get>
switch ( location ) {
10cb0b: 83 c4 10 add $0x10,%esp
10cb0e: 8b 55 f4 mov -0xc(%ebp),%edx
10cb11: 85 d2 test %edx,%edx
10cb13: 75 29 jne 10cb3e <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
10cb15: 8b 50 40 mov 0x40(%eax),%edx
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
10cb18: f6 42 11 40 testb $0x40,0x11(%edx)
10cb1c: 74 08 je 10cb26 <_Rate_monotonic_Timeout+0x32>
10cb1e: 8b 48 08 mov 0x8(%eax),%ecx
10cb21: 39 4a 20 cmp %ecx,0x20(%edx)
10cb24: 74 4e je 10cb74 <_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 ) {
10cb26: 83 78 38 01 cmpl $0x1,0x38(%eax)
10cb2a: 74 14 je 10cb40 <_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;
10cb2c: 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;
10cb33: a1 f0 b1 12 00 mov 0x12b1f0,%eax
10cb38: 48 dec %eax
10cb39: a3 f0 b1 12 00 mov %eax,0x12b1f0
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
10cb3e: c9 leave
10cb3f: 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;
10cb40: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax)
_Rate_monotonic_Initiate_statistics( the_period );
10cb47: 83 ec 0c sub $0xc,%esp
10cb4a: 50 push %eax
10cb4b: 89 45 e4 mov %eax,-0x1c(%ebp)
10cb4e: e8 e5 f9 ff ff call 10c538 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10cb53: 8b 45 e4 mov -0x1c(%ebp),%eax
10cb56: 8b 50 3c mov 0x3c(%eax),%edx
10cb59: 89 50 1c mov %edx,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10cb5c: 5a pop %edx
10cb5d: 59 pop %ecx
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
10cb5e: 83 c0 10 add $0x10,%eax
10cb61: 50 push %eax
10cb62: 68 c0 b2 12 00 push $0x12b2c0
10cb67: e8 0c 37 00 00 call 110278 <_Watchdog_Insert>
10cb6c: 83 c4 10 add $0x10,%esp
10cb6f: eb c2 jmp 10cb33 <_Rate_monotonic_Timeout+0x3f>
10cb71: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10cb74: 83 ec 08 sub $0x8,%esp
10cb77: 68 f8 ff 03 10 push $0x1003fff8
10cb7c: 52 push %edx
10cb7d: 89 45 e4 mov %eax,-0x1c(%ebp)
10cb80: e8 1b 25 00 00 call 10f0a0 <_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 );
10cb85: 8b 45 e4 mov -0x1c(%ebp),%eax
10cb88: 89 04 24 mov %eax,(%esp)
10cb8b: eb c1 jmp 10cb4e <_Rate_monotonic_Timeout+0x5a>
0010c5ac <_Rate_monotonic_Update_statistics>:
void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
10c5ac: 55 push %ebp
10c5ad: 89 e5 mov %esp,%ebp
10c5af: 57 push %edi
10c5b0: 56 push %esi
10c5b1: 53 push %ebx
10c5b2: 83 ec 1c sub $0x1c,%esp
10c5b5: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
10c5b8: ff 43 54 incl 0x54(%ebx)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
10c5bb: 83 7b 38 04 cmpl $0x4,0x38(%ebx)
10c5bf: 0f 84 bf 00 00 00 je 10c684 <_Rate_monotonic_Update_statistics+0xd8>
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
10c5c5: 51 push %ecx
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
10c5c6: 8d 7d e0 lea -0x20(%ebp),%edi
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
10c5c9: 57 push %edi
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
10c5ca: 8d 75 d8 lea -0x28(%ebp),%esi
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
10c5cd: 56 push %esi
10c5ce: 53 push %ebx
10c5cf: e8 cc fe ff ff call 10c4a0 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
10c5d4: 83 c4 10 add $0x10,%esp
10c5d7: 84 c0 test %al,%al
10c5d9: 75 09 jne 10c5e4 <_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
}
10c5db: 8d 65 f4 lea -0xc(%ebp),%esp
10c5de: 5b pop %ebx
10c5df: 5e pop %esi
10c5e0: 5f pop %edi
10c5e1: c9 leave
10c5e2: c3 ret
10c5e3: 90 nop
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
10c5e4: 83 ec 08 sub $0x8,%esp
10c5e7: 57 push %edi
10c5e8: 8d 43 6c lea 0x6c(%ebx),%eax
10c5eb: 50 push %eax
10c5ec: e8 ab 38 00 00 call 10fe9c <_Timespec_Add_to>
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
10c5f1: 58 pop %eax
10c5f2: 5a pop %edx
10c5f3: 8d 43 5c lea 0x5c(%ebx),%eax
10c5f6: 50 push %eax
10c5f7: 57 push %edi
10c5f8: e8 77 39 00 00 call 10ff74 <_Timespec_Less_than>
10c5fd: 83 c4 10 add $0x10,%esp
10c600: 84 c0 test %al,%al
10c602: 74 0c je 10c610 <_Rate_monotonic_Update_statistics+0x64>
stats->min_cpu_time = executed;
10c604: 8b 45 e0 mov -0x20(%ebp),%eax
10c607: 8b 55 e4 mov -0x1c(%ebp),%edx
10c60a: 89 43 5c mov %eax,0x5c(%ebx)
10c60d: 89 53 60 mov %edx,0x60(%ebx)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
10c610: 83 ec 08 sub $0x8,%esp
10c613: 8d 43 64 lea 0x64(%ebx),%eax
10c616: 50 push %eax
10c617: 57 push %edi
10c618: e8 33 39 00 00 call 10ff50 <_Timespec_Greater_than>
10c61d: 83 c4 10 add $0x10,%esp
10c620: 84 c0 test %al,%al
10c622: 74 0c je 10c630 <_Rate_monotonic_Update_statistics+0x84>
stats->max_cpu_time = executed;
10c624: 8b 45 e0 mov -0x20(%ebp),%eax
10c627: 8b 55 e4 mov -0x1c(%ebp),%edx
10c62a: 89 43 64 mov %eax,0x64(%ebx)
10c62d: 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 );
10c630: 83 ec 08 sub $0x8,%esp
10c633: 56 push %esi
10c634: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10c63a: 50 push %eax
10c63b: e8 5c 38 00 00 call 10fe9c <_Timespec_Add_to>
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
10c640: 5a pop %edx
10c641: 59 pop %ecx
10c642: 8d 43 74 lea 0x74(%ebx),%eax
10c645: 50 push %eax
10c646: 56 push %esi
10c647: e8 28 39 00 00 call 10ff74 <_Timespec_Less_than>
10c64c: 83 c4 10 add $0x10,%esp
10c64f: 84 c0 test %al,%al
10c651: 75 39 jne 10c68c <_Rate_monotonic_Update_statistics+0xe0>
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
10c653: 83 ec 08 sub $0x8,%esp
10c656: 8d 43 7c lea 0x7c(%ebx),%eax
10c659: 50 push %eax
10c65a: 56 push %esi
10c65b: e8 f0 38 00 00 call 10ff50 <_Timespec_Greater_than>
10c660: 83 c4 10 add $0x10,%esp
10c663: 84 c0 test %al,%al
10c665: 0f 84 70 ff ff ff je 10c5db <_Rate_monotonic_Update_statistics+0x2f>
stats->max_wall_time = since_last_period;
10c66b: 8b 45 d8 mov -0x28(%ebp),%eax
10c66e: 8b 55 dc mov -0x24(%ebp),%edx
10c671: 89 43 7c mov %eax,0x7c(%ebx)
10c674: 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
}
10c67a: 8d 65 f4 lea -0xc(%ebp),%esp
10c67d: 5b pop %ebx
10c67e: 5e pop %esi
10c67f: 5f pop %edi
10c680: c9 leave
10c681: c3 ret
10c682: 66 90 xchg %ax,%ax
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
10c684: ff 43 58 incl 0x58(%ebx)
10c687: e9 39 ff ff ff jmp 10c5c5 <_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;
10c68c: 8b 45 d8 mov -0x28(%ebp),%eax
10c68f: 8b 55 dc mov -0x24(%ebp),%edx
10c692: 89 43 74 mov %eax,0x74(%ebx)
10c695: 89 53 78 mov %edx,0x78(%ebx)
10c698: eb b9 jmp 10c653 <_Rate_monotonic_Update_statistics+0xa7>
0010d1e4 <_Scheduler_priority_Block>:
#include <rtems/score/thread.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
)
{
10d1e4: 55 push %ebp
10d1e5: 89 e5 mov %esp,%ebp
10d1e7: 53 push %ebx
10d1e8: 8b 45 08 mov 0x8(%ebp),%eax
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
10d1eb: 8b 88 8c 00 00 00 mov 0x8c(%eax),%ecx
ready = sched_info->ready_chain;
10d1f1: 8b 11 mov (%ecx),%edx
if ( _Chain_Has_only_one_node( ready ) ) {
10d1f3: 8b 5a 08 mov 0x8(%edx),%ebx
10d1f6: 39 1a cmp %ebx,(%edx)
10d1f8: 74 6e je 10d268 <_Scheduler_priority_Block+0x84>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10d1fa: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
10d1fc: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
10d1ff: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
10d202: 89 0a mov %ecx,(%edx)
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
10d204: 3b 05 fc 83 12 00 cmp 0x1283fc,%eax
10d20a: 74 18 je 10d224 <_Scheduler_priority_Block+0x40>
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
10d20c: 3b 05 f8 83 12 00 cmp 0x1283f8,%eax
10d212: 74 04 je 10d218 <_Scheduler_priority_Block+0x34>
_Thread_Dispatch_necessary = true;
}
10d214: 5b pop %ebx
10d215: c9 leave
10d216: c3 ret
10d217: 90 nop
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
10d218: c6 05 04 84 12 00 01 movb $0x1,0x128404
}
10d21f: 5b pop %ebx
10d220: c9 leave
10d221: c3 ret
10d222: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10d224: 66 8b 1d 20 84 12 00 mov 0x128420,%bx
10d22b: 31 d2 xor %edx,%edx
10d22d: 89 d1 mov %edx,%ecx
10d22f: 66 0f bc cb bsf %bx,%cx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d233: 0f b7 c9 movzwl %cx,%ecx
10d236: 66 8b 9c 09 40 84 12 mov 0x128440(%ecx,%ecx,1),%bx
10d23d: 00
10d23e: 66 0f bc d3 bsf %bx,%dx
return (_Priority_Bits_index( major ) << 4) +
10d242: c1 e1 04 shl $0x4,%ecx
10d245: 0f b7 d2 movzwl %dx,%edx
10d248: 8d 14 11 lea (%ecx,%edx,1),%edx
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10d24b: 8d 14 52 lea (%edx,%edx,2),%edx
10d24e: c1 e2 02 shl $0x2,%edx
10d251: 03 15 40 3a 12 00 add 0x123a40,%edx
10d257: 8b 0a mov (%edx),%ecx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d259: 83 c2 04 add $0x4,%edx
10d25c: 39 d1 cmp %edx,%ecx
10d25e: 74 44 je 10d2a4 <_Scheduler_priority_Block+0xc0><== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d260: 89 0d fc 83 12 00 mov %ecx,0x1283fc
10d266: eb a4 jmp 10d20c <_Scheduler_priority_Block+0x28>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10d268: 8d 5a 04 lea 0x4(%edx),%ebx
10d26b: 89 1a mov %ebx,(%edx)
head->next = tail;
head->previous = NULL;
10d26d: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx)
tail->previous = head;
10d274: 89 52 08 mov %edx,0x8(%edx)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
10d277: 8b 59 04 mov 0x4(%ecx),%ebx
10d27a: 66 8b 13 mov (%ebx),%dx
10d27d: 66 23 51 0e and 0xe(%ecx),%dx
10d281: 66 89 13 mov %dx,(%ebx)
if ( *the_priority_map->minor == 0 )
10d284: 66 85 d2 test %dx,%dx
10d287: 0f 85 77 ff ff ff jne 10d204 <_Scheduler_priority_Block+0x20>
_Priority_Major_bit_map &= the_priority_map->block_major;
10d28d: 66 8b 15 20 84 12 00 mov 0x128420,%dx
10d294: 23 51 0c and 0xc(%ecx),%edx
10d297: 66 89 15 20 84 12 00 mov %dx,0x128420
10d29e: e9 61 ff ff ff jmp 10d204 <_Scheduler_priority_Block+0x20>
10d2a3: 90 nop
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10d2a4: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
10d2a6: eb b8 jmp 10d260 <_Scheduler_priority_Block+0x7c><== NOT EXECUTED
0010d3f8 <_Scheduler_priority_Schedule>:
#include <rtems/system.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Schedule(void)
{
10d3f8: 55 push %ebp
10d3f9: 89 e5 mov %esp,%ebp
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
10d3fb: 66 8b 0d 20 84 12 00 mov 0x128420,%cx
10d402: 31 c0 xor %eax,%eax
10d404: 89 c2 mov %eax,%edx
10d406: 66 0f bc d1 bsf %cx,%dx
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
10d40a: 0f b7 d2 movzwl %dx,%edx
10d40d: 66 8b 8c 12 40 84 12 mov 0x128440(%edx,%edx,1),%cx
10d414: 00
10d415: 66 0f bc c1 bsf %cx,%ax
return (_Priority_Bits_index( major ) << 4) +
10d419: c1 e2 04 shl $0x4,%edx
10d41c: 0f b7 c0 movzwl %ax,%eax
10d41f: 8d 04 02 lea (%edx,%eax,1),%eax
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
10d422: 8d 04 40 lea (%eax,%eax,2),%eax
10d425: c1 e0 02 shl $0x2,%eax
10d428: 03 05 40 3a 12 00 add 0x123a40,%eax
_Scheduler_priority_Schedule_body();
}
10d42e: 8b 10 mov (%eax),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10d430: 83 c0 04 add $0x4,%eax
10d433: 39 c2 cmp %eax,%edx
10d435: 74 09 je 10d440 <_Scheduler_priority_Schedule+0x48><== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d437: 89 15 fc 83 12 00 mov %edx,0x1283fc
10d43d: c9 leave
10d43e: c3 ret
10d43f: 90 nop
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
10d440: 31 d2 xor %edx,%edx <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
10d442: 89 15 fc 83 12 00 mov %edx,0x1283fc <== NOT EXECUTED
10d448: c9 leave <== NOT EXECUTED
10d449: c3 ret <== NOT EXECUTED
0010d51c <_Scheduler_priority_Yield>:
* ready chain
* select heir
*/
void _Scheduler_priority_Yield(void)
{
10d51c: 55 push %ebp
10d51d: 89 e5 mov %esp,%ebp
10d51f: 56 push %esi
10d520: 53 push %ebx
Scheduler_priority_Per_thread *sched_info;
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
10d521: a1 f8 83 12 00 mov 0x1283f8,%eax
sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info;
ready = sched_info->ready_chain;
10d526: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx
10d52c: 8b 12 mov (%edx),%edx
_ISR_Disable( level );
10d52e: 9c pushf
10d52f: fa cli
10d530: 59 pop %ecx
if ( !_Chain_Has_only_one_node( ready ) ) {
10d531: 8b 5a 08 mov 0x8(%edx),%ebx
10d534: 39 1a cmp %ebx,(%edx)
10d536: 74 40 je 10d578 <_Scheduler_priority_Yield+0x5c>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10d538: 8b 30 mov (%eax),%esi
previous = the_node->previous;
10d53a: 8b 58 04 mov 0x4(%eax),%ebx
next->previous = previous;
10d53d: 89 5e 04 mov %ebx,0x4(%esi)
previous->next = next;
10d540: 89 33 mov %esi,(%ebx)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
10d542: 8b 5a 08 mov 0x8(%edx),%ebx
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
10d545: 8d 72 04 lea 0x4(%edx),%esi
10d548: 89 30 mov %esi,(%eax)
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
10d54a: 89 42 08 mov %eax,0x8(%edx)
old_last->next = the_node;
10d54d: 89 03 mov %eax,(%ebx)
the_node->previous = old_last;
10d54f: 89 58 04 mov %ebx,0x4(%eax)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
10d552: 51 push %ecx
10d553: 9d popf
10d554: fa cli
if ( _Thread_Is_heir( executing ) )
10d555: 3b 05 fc 83 12 00 cmp 0x1283fc,%eax
10d55b: 74 0f je 10d56c <_Scheduler_priority_Yield+0x50>
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Thread_Dispatch_necessary = true;
10d55d: c6 05 04 84 12 00 01 movb $0x1,0x128404
_ISR_Enable( level );
10d564: 51 push %ecx
10d565: 9d popf
}
10d566: 5b pop %ebx
10d567: 5e pop %esi
10d568: c9 leave
10d569: c3 ret
10d56a: 66 90 xchg %ax,%ax
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
10d56c: 8b 02 mov (%edx),%eax
10d56e: a3 fc 83 12 00 mov %eax,0x1283fc
10d573: eb e8 jmp 10d55d <_Scheduler_priority_Yield+0x41>
10d575: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
10d578: 3b 05 fc 83 12 00 cmp 0x1283fc,%eax
10d57e: 75 dd jne 10d55d <_Scheduler_priority_Yield+0x41>
10d580: eb e2 jmp 10d564 <_Scheduler_priority_Yield+0x48>
0010db38 <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
10db38: 55 push %ebp
10db39: 89 e5 mov %esp,%ebp
10db3b: 53 push %ebx
10db3c: 83 ec 04 sub $0x4,%esp
10db3f: 8b 5d 08 mov 0x8(%ebp),%ebx
10db42: a1 90 ba 12 00 mov 0x12ba90,%eax
10db47: 40 inc %eax
10db48: a3 90 ba 12 00 mov %eax,0x12ba90
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
10db4d: a1 28 bb 12 00 mov 0x12bb28,%eax
if ( time->tv_sec < seconds )
10db52: 8b 13 mov (%ebx),%edx
10db54: 39 d0 cmp %edx,%eax
10db56: 7f 34 jg 10db8c <_TOD_Set+0x54>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
10db58: 51 push %ecx
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
10db59: 29 c2 sub %eax,%edx
10db5b: 52 push %edx
10db5c: 6a 00 push $0x0
10db5e: 68 54 bb 12 00 push $0x12bb54
10db63: e8 20 25 00 00 call 110088 <_Watchdog_Adjust>
10db68: 83 c4 10 add $0x10,%esp
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
10db6b: 8b 03 mov (%ebx),%eax
10db6d: a3 28 bb 12 00 mov %eax,0x12bb28
10db72: 8b 43 04 mov 0x4(%ebx),%eax
10db75: a3 2c bb 12 00 mov %eax,0x12bb2c
_TOD_Is_set = true;
10db7a: c6 05 a4 ba 12 00 01 movb $0x1,0x12baa4
_TOD_Activate();
_Thread_Enable_dispatch();
}
10db81: 8b 5d fc mov -0x4(%ebp),%ebx
10db84: c9 leave
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
10db85: e9 12 16 00 00 jmp 10f19c <_Thread_Enable_dispatch>
10db8a: 66 90 xchg %ax,%ax
10db8c: 51 push %ecx
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
if ( time->tv_sec < seconds )
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
10db8d: 29 d0 sub %edx,%eax
10db8f: 50 push %eax
10db90: 6a 01 push $0x1
10db92: 68 54 bb 12 00 push $0x12bb54
10db97: e8 ec 24 00 00 call 110088 <_Watchdog_Adjust>
10db9c: 83 c4 10 add $0x10,%esp
10db9f: eb ca jmp 10db6b <_TOD_Set+0x33>
0010c244 <_TOD_To_seconds>:
*/
uint32_t _TOD_To_seconds(
const rtems_time_of_day *the_tod
)
{
10c244: 55 push %ebp
10c245: 89 e5 mov %esp,%ebp
10c247: 56 push %esi
10c248: 53 push %ebx
10c249: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t time;
uint32_t year_mod_4;
time = the_tod->day - 1;
10c24c: 8b 72 08 mov 0x8(%edx),%esi
10c24f: 4e dec %esi
year_mod_4 = the_tod->year & 3;
10c250: 8b 02 mov (%edx),%eax
if ( year_mod_4 == 0 )
10c252: 89 c3 mov %eax,%ebx
10c254: 83 e3 03 and $0x3,%ebx
10c257: 74 67 je 10c2c0 <_TOD_To_seconds+0x7c>
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
else
time += _TOD_Days_to_date[ 0 ][ the_tod->month ];
10c259: 8b 4a 04 mov 0x4(%edx),%ecx
10c25c: 0f b7 8c 09 80 43 12 movzwl 0x124380(%ecx,%ecx,1),%ecx
10c263: 00
10c264: 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 ];
10c267: 0f b7 8c 1b b4 43 12 movzwl 0x1243b4(%ebx,%ebx,1),%ecx
10c26e: 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 ) *
10c26f: 2d c4 07 00 00 sub $0x7c4,%eax
10c274: c1 e8 02 shr $0x2,%eax
10c277: 8d 1c c0 lea (%eax,%eax,8),%ebx
10c27a: 8d 1c d8 lea (%eax,%ebx,8),%ebx
10c27d: 8d 1c 9b lea (%ebx,%ebx,4),%ebx
10c280: 8d 04 98 lea (%eax,%ebx,4),%eax
10c283: 01 c1 add %eax,%ecx
( (TOD_DAYS_PER_YEAR * 4) + 1);
time += _TOD_Days_since_last_leap_year[ year_mod_4 ];
10c285: 01 f1 add %esi,%ecx
time *= TOD_SECONDS_PER_DAY;
10c287: 8d 04 89 lea (%ecx,%ecx,4),%eax
10c28a: 8d 04 81 lea (%ecx,%eax,4),%eax
10c28d: 8d 04 c1 lea (%ecx,%eax,8),%eax
10c290: c1 e0 02 shl $0x2,%eax
10c293: 29 c8 sub %ecx,%eax
10c295: c1 e0 07 shl $0x7,%eax
time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute)
10c298: 8b 5a 14 mov 0x14(%edx),%ebx
10c29b: 8b 4a 0c mov 0xc(%edx),%ecx
10c29e: 8d 0c 49 lea (%ecx,%ecx,2),%ecx
10c2a1: 8d 0c 89 lea (%ecx,%ecx,4),%ecx
10c2a4: c1 e1 02 shl $0x2,%ecx
10c2a7: 03 4a 10 add 0x10(%edx),%ecx
* TOD_SECONDS_PER_MINUTE;
10c2aa: 8d 14 49 lea (%ecx,%ecx,2),%edx
10c2ad: 8d 14 92 lea (%edx,%edx,4),%edx
time += the_tod->second;
10c2b0: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx
time += TOD_SECONDS_1970_THROUGH_1988;
10c2b7: 8d 04 02 lea (%edx,%eax,1),%eax
return( time );
}
10c2ba: 5b pop %ebx
10c2bb: 5e pop %esi
10c2bc: c9 leave
10c2bd: c3 ret
10c2be: 66 90 xchg %ax,%ax
time = the_tod->day - 1;
year_mod_4 = the_tod->year & 3;
if ( year_mod_4 == 0 )
time += _TOD_Days_to_date[ 1 ][ the_tod->month ];
10c2c0: 8b 4a 04 mov 0x4(%edx),%ecx
10c2c3: 0f b7 8c 09 9a 43 12 movzwl 0x12439a(%ecx,%ecx,1),%ecx
10c2ca: 00
10c2cb: 8d 34 31 lea (%ecx,%esi,1),%esi
10c2ce: eb 97 jmp 10c267 <_TOD_To_seconds+0x23>
0010c2d0 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
10c2d0: 55 push %ebp
10c2d1: 89 e5 mov %esp,%ebp
10c2d3: 53 push %ebx
10c2d4: 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();
10c2d7: 8b 1d ec 72 12 00 mov 0x1272ec,%ebx
if ((!the_tod) ||
10c2dd: 85 c9 test %ecx,%ecx
10c2df: 74 53 je 10c334 <_TOD_Validate+0x64> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
10c2e1: b8 40 42 0f 00 mov $0xf4240,%eax
10c2e6: 31 d2 xor %edx,%edx
10c2e8: f7 f3 div %ebx
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
10c2ea: 3b 41 18 cmp 0x18(%ecx),%eax
10c2ed: 76 45 jbe 10c334 <_TOD_Validate+0x64>
(the_tod->ticks >= ticks_per_second) ||
10c2ef: 83 79 14 3b cmpl $0x3b,0x14(%ecx)
10c2f3: 77 3f ja 10c334 <_TOD_Validate+0x64>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
10c2f5: 83 79 10 3b cmpl $0x3b,0x10(%ecx)
10c2f9: 77 39 ja 10c334 <_TOD_Validate+0x64>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
10c2fb: 83 79 0c 17 cmpl $0x17,0xc(%ecx)
10c2ff: 77 33 ja 10c334 <_TOD_Validate+0x64>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
10c301: 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) ||
10c304: 85 c0 test %eax,%eax
10c306: 74 2c je 10c334 <_TOD_Validate+0x64> <== NEVER TAKEN
(the_tod->month == 0) ||
10c308: 83 f8 0c cmp $0xc,%eax
10c30b: 77 27 ja 10c334 <_TOD_Validate+0x64>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
10c30d: 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) ||
10c30f: 81 fa c3 07 00 00 cmp $0x7c3,%edx
10c315: 76 1d jbe 10c334 <_TOD_Validate+0x64>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
10c317: 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) ||
10c31a: 85 c9 test %ecx,%ecx
10c31c: 74 16 je 10c334 <_TOD_Validate+0x64> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
10c31e: 83 e2 03 and $0x3,%edx
10c321: 75 16 jne 10c339 <_TOD_Validate+0x69>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
10c323: 8b 04 85 f4 43 12 00 mov 0x1243f4(,%eax,4),%eax
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
10c32a: 39 c8 cmp %ecx,%eax
10c32c: 0f 93 c0 setae %al
10c32f: eb 05 jmp 10c336 <_TOD_Validate+0x66>
10c331: 8d 76 00 lea 0x0(%esi),%esi
(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;
10c334: 31 c0 xor %eax,%eax
if ( the_tod->day > days_in_month )
return false;
return true;
}
10c336: 5b pop %ebx
10c337: c9 leave
10c338: 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 ];
10c339: 8b 04 85 c0 43 12 00 mov 0x1243c0(,%eax,4),%eax
10c340: eb e8 jmp 10c32a <_TOD_Validate+0x5a>
0010d5d0 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
10d5d0: 55 push %ebp
10d5d1: 89 e5 mov %esp,%ebp
10d5d3: 57 push %edi
10d5d4: 56 push %esi
10d5d5: 53 push %ebx
10d5d6: 83 ec 28 sub $0x28,%esp
10d5d9: 8b 5d 08 mov 0x8(%ebp),%ebx
10d5dc: 8b 75 0c mov 0xc(%ebp),%esi
10d5df: 8a 45 10 mov 0x10(%ebp),%al
10d5e2: 88 45 e7 mov %al,-0x19(%ebp)
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
10d5e5: 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 );
10d5e8: 53 push %ebx
10d5e9: e8 7a 0c 00 00 call 10e268 <_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 )
10d5ee: 83 c4 10 add $0x10,%esp
10d5f1: 39 73 14 cmp %esi,0x14(%ebx)
10d5f4: 74 0d je 10d603 <_Thread_Change_priority+0x33>
_Thread_Set_priority( the_thread, new_priority );
10d5f6: 83 ec 08 sub $0x8,%esp
10d5f9: 56 push %esi
10d5fa: 53 push %ebx
10d5fb: e8 14 0c 00 00 call 10e214 <_Thread_Set_priority>
10d600: 83 c4 10 add $0x10,%esp
_ISR_Disable( level );
10d603: 9c pushf
10d604: fa cli
10d605: 5e pop %esi
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
10d606: 8b 43 10 mov 0x10(%ebx),%eax
if ( state != STATES_TRANSIENT ) {
10d609: 83 f8 04 cmp $0x4,%eax
10d60c: 74 22 je 10d630 <_Thread_Change_priority+0x60>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
10d60e: 83 e7 04 and $0x4,%edi
10d611: 74 11 je 10d624 <_Thread_Change_priority+0x54><== ALWAYS TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
10d613: 56 push %esi
10d614: 9d popf
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10d615: a9 e0 be 03 00 test $0x3bee0,%eax
10d61a: 75 60 jne 10d67c <_Thread_Change_priority+0xac>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10d61c: 8d 65 f4 lea -0xc(%ebp),%esp
10d61f: 5b pop %ebx
10d620: 5e pop %esi
10d621: 5f pop %edi
10d622: c9 leave
10d623: c3 ret
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
10d624: 89 c2 mov %eax,%edx
10d626: 83 e2 fb and $0xfffffffb,%edx
10d629: 89 53 10 mov %edx,0x10(%ebx)
10d62c: eb e5 jmp 10d613 <_Thread_Change_priority+0x43>
10d62e: 66 90 xchg %ax,%ax
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
10d630: 83 e7 04 and $0x4,%edi
10d633: 75 1a jne 10d64f <_Thread_Change_priority+0x7f><== 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 );
10d635: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
if ( prepend_it )
10d63c: 80 7d e7 00 cmpb $0x0,-0x19(%ebp)
10d640: 74 52 je 10d694 <_Thread_Change_priority+0xc4>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
10d642: 83 ec 0c sub $0xc,%esp
10d645: 53 push %ebx
10d646: ff 15 68 3a 12 00 call *0x123a68
10d64c: 83 c4 10 add $0x10,%esp
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
10d64f: 56 push %esi
10d650: 9d popf
10d651: fa cli
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
10d652: ff 15 48 3a 12 00 call *0x123a48
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
10d658: a1 f8 83 12 00 mov 0x1283f8,%eax
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
10d65d: 3b 05 fc 83 12 00 cmp 0x1283fc,%eax
10d663: 74 0d je 10d672 <_Thread_Change_priority+0xa2>
10d665: 80 78 74 00 cmpb $0x0,0x74(%eax)
10d669: 74 07 je 10d672 <_Thread_Change_priority+0xa2>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
10d66b: c6 05 04 84 12 00 01 movb $0x1,0x128404
_ISR_Enable( level );
10d672: 56 push %esi
10d673: 9d popf
}
10d674: 8d 65 f4 lea -0xc(%ebp),%esp
10d677: 5b pop %ebx
10d678: 5e pop %esi
10d679: 5f pop %edi
10d67a: c9 leave
10d67b: 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 );
10d67c: 89 5d 0c mov %ebx,0xc(%ebp)
10d67f: 8b 43 44 mov 0x44(%ebx),%eax
10d682: 89 45 08 mov %eax,0x8(%ebp)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
10d685: 8d 65 f4 lea -0xc(%ebp),%esp
10d688: 5b pop %ebx
10d689: 5e pop %esi
10d68a: 5f pop %edi
10d68b: 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 );
10d68c: e9 eb 0a 00 00 jmp 10e17c <_Thread_queue_Requeue>
10d691: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
10d694: 83 ec 0c sub $0xc,%esp
10d697: 53 push %ebx
10d698: ff 15 64 3a 12 00 call *0x123a64
10d69e: 83 c4 10 add $0x10,%esp
10d6a1: eb ac jmp 10d64f <_Thread_Change_priority+0x7f>
0010d6a4 <_Thread_Clear_state>:
*/
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
10d6a4: 55 push %ebp
10d6a5: 89 e5 mov %esp,%ebp
10d6a7: 53 push %ebx
10d6a8: 83 ec 04 sub $0x4,%esp
10d6ab: 8b 55 08 mov 0x8(%ebp),%edx
10d6ae: 8b 45 0c mov 0xc(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
10d6b1: 9c pushf
10d6b2: fa cli
10d6b3: 5b pop %ebx
current_state = the_thread->current_state;
10d6b4: 8b 4a 10 mov 0x10(%edx),%ecx
if ( current_state & state ) {
10d6b7: 85 c8 test %ecx,%eax
10d6b9: 74 0b je 10d6c6 <_Thread_Clear_state+0x22>
10d6bb: f7 d0 not %eax
10d6bd: 21 c8 and %ecx,%eax
current_state =
the_thread->current_state = _States_Clear( state, current_state );
10d6bf: 89 42 10 mov %eax,0x10(%edx)
if ( _States_Is_ready( current_state ) ) {
10d6c2: 85 c0 test %eax,%eax
10d6c4: 74 0a je 10d6d0 <_Thread_Clear_state+0x2c>
_Scheduler_Unblock( the_thread );
}
}
_ISR_Enable( level );
10d6c6: 53 push %ebx
10d6c7: 9d popf
}
10d6c8: 8b 5d fc mov -0x4(%ebp),%ebx
10d6cb: c9 leave
10d6cc: c3 ret
10d6cd: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Unblock(
Thread_Control *the_thread
)
{
_Scheduler.Operations.unblock( the_thread );
10d6d0: 83 ec 0c sub $0xc,%esp
10d6d3: 52 push %edx
10d6d4: ff 15 54 3a 12 00 call *0x123a54
10d6da: 83 c4 10 add $0x10,%esp
10d6dd: eb e7 jmp 10d6c6 <_Thread_Clear_state+0x22>
0010d854 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10d854: 55 push %ebp
10d855: 89 e5 mov %esp,%ebp
10d857: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10d85a: 8d 45 f4 lea -0xc(%ebp),%eax
10d85d: 50 push %eax
10d85e: ff 75 08 pushl 0x8(%ebp)
10d861: e8 c6 01 00 00 call 10da2c <_Thread_Get>
switch ( location ) {
10d866: 83 c4 10 add $0x10,%esp
10d869: 8b 55 f4 mov -0xc(%ebp),%edx
10d86c: 85 d2 test %edx,%edx
10d86e: 75 1c jne 10d88c <_Thread_Delay_ended+0x38><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
10d870: 83 ec 08 sub $0x8,%esp
10d873: 68 18 00 00 10 push $0x10000018
10d878: 50 push %eax
10d879: e8 26 fe ff ff call 10d6a4 <_Thread_Clear_state>
10d87e: a1 50 7e 12 00 mov 0x127e50,%eax
10d883: 48 dec %eax
10d884: a3 50 7e 12 00 mov %eax,0x127e50
10d889: 83 c4 10 add $0x10,%esp
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
10d88c: c9 leave
10d88d: c3 ret
0010d890 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
10d890: 55 push %ebp
10d891: 89 e5 mov %esp,%ebp
10d893: 57 push %edi
10d894: 56 push %esi
10d895: 53 push %ebx
10d896: 83 ec 1c sub $0x1c,%esp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
10d899: 8b 1d f8 83 12 00 mov 0x1283f8,%ebx
_ISR_Disable( level );
10d89f: 9c pushf
10d8a0: fa cli
10d8a1: 58 pop %eax
while ( _Thread_Dispatch_necessary == true ) {
10d8a2: 8a 15 04 84 12 00 mov 0x128404,%dl
10d8a8: 84 d2 test %dl,%dl
10d8aa: 0f 84 3c 01 00 00 je 10d9ec <_Thread_Dispatch+0x15c>
heir = _Thread_Heir;
10d8b0: 8b 35 fc 83 12 00 mov 0x1283fc,%esi
_Thread_Dispatch_disable_level = 1;
10d8b6: c7 05 50 7e 12 00 01 movl $0x1,0x127e50
10d8bd: 00 00 00
_Thread_Dispatch_necessary = false;
10d8c0: c6 05 04 84 12 00 00 movb $0x0,0x128404
_Thread_Executing = heir;
10d8c7: 89 35 f8 83 12 00 mov %esi,0x1283f8
/*
* 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 )
10d8cd: 39 f3 cmp %esi,%ebx
10d8cf: 0f 84 17 01 00 00 je 10d9ec <_Thread_Dispatch+0x15c>
10d8d5: 8d 7d d8 lea -0x28(%ebp),%edi
10d8d8: e9 f5 00 00 00 jmp 10d9d2 <_Thread_Dispatch+0x142>
10d8dd: 8d 76 00 lea 0x0(%esi),%esi
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 );
10d8e0: 50 push %eax
10d8e1: 9d popf
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
10d8e2: 83 ec 0c sub $0xc,%esp
10d8e5: 8d 45 e0 lea -0x20(%ebp),%eax
10d8e8: 50 push %eax
10d8e9: e8 32 3a 00 00 call 111320 <_TOD_Get_uptime>
_Timestamp_Subtract(
10d8ee: 83 c4 0c add $0xc,%esp
10d8f1: 57 push %edi
10d8f2: 8d 45 e0 lea -0x20(%ebp),%eax
10d8f5: 50 push %eax
10d8f6: 68 0c 7f 12 00 push $0x127f0c
10d8fb: e8 9c 0b 00 00 call 10e49c <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
10d900: 58 pop %eax
10d901: 5a pop %edx
10d902: 57 push %edi
10d903: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax
10d909: 50 push %eax
10d90a: e8 51 0b 00 00 call 10e460 <_Timespec_Add_to>
_Thread_Time_of_last_context_switch = uptime;
10d90f: 8b 45 e0 mov -0x20(%ebp),%eax
10d912: 8b 55 e4 mov -0x1c(%ebp),%edx
10d915: a3 0c 7f 12 00 mov %eax,0x127f0c
10d91a: 89 15 10 7f 12 00 mov %edx,0x127f10
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
10d920: a1 e4 7e 12 00 mov 0x127ee4,%eax
10d925: 83 c4 10 add $0x10,%esp
10d928: 85 c0 test %eax,%eax
10d92a: 74 10 je 10d93c <_Thread_Dispatch+0xac> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
10d92c: 8b 10 mov (%eax),%edx
10d92e: 89 93 e4 00 00 00 mov %edx,0xe4(%ebx)
*_Thread_libc_reent = heir->libc_reent;
10d934: 8b 96 e4 00 00 00 mov 0xe4(%esi),%edx
10d93a: 89 10 mov %edx,(%eax)
}
_User_extensions_Thread_switch( executing, heir );
10d93c: 83 ec 08 sub $0x8,%esp
10d93f: 56 push %esi
10d940: 53 push %ebx
10d941: e8 f6 0d 00 00 call 10e73c <_User_extensions_Thread_switch>
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
10d946: 5a pop %edx
10d947: 59 pop %ecx
10d948: 81 c6 c8 00 00 00 add $0xc8,%esi
10d94e: 56 push %esi
10d94f: 8d 83 c8 00 00 00 lea 0xc8(%ebx),%eax
10d955: 50 push %eax
10d956: e8 f5 10 00 00 call 10ea50 <_CPU_Context_switch>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
10d95b: 83 c4 10 add $0x10,%esp
10d95e: 8b 83 e0 00 00 00 mov 0xe0(%ebx),%eax
10d964: 85 c0 test %eax,%eax
10d966: 74 36 je 10d99e <_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 );
10d968: a1 e0 7e 12 00 mov 0x127ee0,%eax
10d96d: 39 c3 cmp %eax,%ebx
10d96f: 74 2d je 10d99e <_Thread_Dispatch+0x10e>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
10d971: 85 c0 test %eax,%eax
10d973: 74 11 je 10d986 <_Thread_Dispatch+0xf6>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
10d975: 83 ec 0c sub $0xc,%esp
10d978: 05 e0 00 00 00 add $0xe0,%eax
10d97d: 50 push %eax
10d97e: e8 01 11 00 00 call 10ea84 <_CPU_Context_save_fp>
10d983: 83 c4 10 add $0x10,%esp
_Context_Restore_fp( &executing->fp_context );
10d986: 83 ec 0c sub $0xc,%esp
10d989: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax
10d98f: 50 push %eax
10d990: e8 f9 10 00 00 call 10ea8e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
10d995: 89 1d e0 7e 12 00 mov %ebx,0x127ee0
10d99b: 83 c4 10 add $0x10,%esp
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
10d99e: 8b 1d f8 83 12 00 mov 0x1283f8,%ebx
_ISR_Disable( level );
10d9a4: 9c pushf
10d9a5: fa cli
10d9a6: 58 pop %eax
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
10d9a7: 8a 15 04 84 12 00 mov 0x128404,%dl
10d9ad: 84 d2 test %dl,%dl
10d9af: 74 3b je 10d9ec <_Thread_Dispatch+0x15c>
heir = _Thread_Heir;
10d9b1: 8b 35 fc 83 12 00 mov 0x1283fc,%esi
_Thread_Dispatch_disable_level = 1;
10d9b7: c7 05 50 7e 12 00 01 movl $0x1,0x127e50
10d9be: 00 00 00
_Thread_Dispatch_necessary = false;
10d9c1: c6 05 04 84 12 00 00 movb $0x0,0x128404
_Thread_Executing = heir;
10d9c8: 89 35 f8 83 12 00 mov %esi,0x1283f8
/*
* 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 )
10d9ce: 39 de cmp %ebx,%esi
10d9d0: 74 1a je 10d9ec <_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 )
10d9d2: 83 7e 7c 01 cmpl $0x1,0x7c(%esi)
10d9d6: 0f 85 04 ff ff ff jne 10d8e0 <_Thread_Dispatch+0x50>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
10d9dc: 8b 15 20 7e 12 00 mov 0x127e20,%edx
10d9e2: 89 56 78 mov %edx,0x78(%esi)
10d9e5: e9 f6 fe ff ff jmp 10d8e0 <_Thread_Dispatch+0x50>
10d9ea: 66 90 xchg %ax,%ax
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
10d9ec: c7 05 50 7e 12 00 00 movl $0x0,0x127e50
10d9f3: 00 00 00
_ISR_Enable( level );
10d9f6: 50 push %eax
10d9f7: 9d popf
_API_extensions_Run_postswitch();
10d9f8: e8 13 e5 ff ff call 10bf10 <_API_extensions_Run_postswitch>
}
10d9fd: 8d 65 f4 lea -0xc(%ebp),%esp
10da00: 5b pop %ebx
10da01: 5e pop %esi
10da02: 5f pop %edi
10da03: c9 leave
10da04: c3 ret
0010da2c <_Thread_Get>:
*/
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
10da2c: 55 push %ebp
10da2d: 89 e5 mov %esp,%ebp
10da2f: 53 push %ebx
10da30: 83 ec 04 sub $0x4,%esp
10da33: 8b 45 08 mov 0x8(%ebp),%eax
10da36: 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 ) ) {
10da39: 85 c0 test %eax,%eax
10da3b: 74 4b je 10da88 <_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);
10da3d: 89 c2 mov %eax,%edx
10da3f: c1 ea 18 shr $0x18,%edx
10da42: 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 )
10da45: 8d 5a ff lea -0x1(%edx),%ebx
10da48: 83 fb 02 cmp $0x2,%ebx
10da4b: 77 2b ja 10da78 <_Thread_Get+0x4c>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
10da4d: 89 c3 mov %eax,%ebx
10da4f: 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 :) */
10da52: 4b dec %ebx
10da53: 75 23 jne 10da78 <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
10da55: 8b 14 95 28 7e 12 00 mov 0x127e28(,%edx,4),%edx
* There is no way for this to happen if POSIX is enabled. But there
* is actually a test case in sp43 for this which trips it whether or
* not POSIX is enabled. So in the interest of safety, this is left
* on in all configurations.
*/
if ( !api_information ) {
10da5c: 85 d2 test %edx,%edx
10da5e: 74 18 je 10da78 <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
information = api_information[ the_class ];
10da60: 8b 52 04 mov 0x4(%edx),%edx
if ( !information ) {
10da63: 85 d2 test %edx,%edx
10da65: 74 11 je 10da78 <_Thread_Get+0x4c>
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
10da67: 53 push %ebx
10da68: 51 push %ecx
10da69: 50 push %eax
10da6a: 52 push %edx
10da6b: e8 10 f4 ff ff call 10ce80 <_Objects_Get>
10da70: 83 c4 10 add $0x10,%esp
done:
return tp;
}
10da73: 8b 5d fc mov -0x4(%ebp),%ebx
10da76: c9 leave
10da77: c3 ret
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
10da78: 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;
10da7e: 31 c0 xor %eax,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10da80: 8b 5d fc mov -0x4(%ebp),%ebx
10da83: c9 leave
10da84: c3 ret
10da85: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10da88: a1 50 7e 12 00 mov 0x127e50,%eax
10da8d: 40 inc %eax
10da8e: a3 50 7e 12 00 mov %eax,0x127e50
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;
10da93: c7 01 00 00 00 00 movl $0x0,(%ecx)
tp = _Thread_Executing;
10da99: a1 f8 83 12 00 mov 0x1283f8,%eax
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
10da9e: 8b 5d fc mov -0x4(%ebp),%ebx
10daa1: c9 leave
10daa2: c3 ret
0011311c <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
11311c: 55 push %ebp
11311d: 89 e5 mov %esp,%ebp
11311f: 53 push %ebx
113120: 83 ec 14 sub $0x14,%esp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
113123: 8b 1d f8 83 12 00 mov 0x1283f8,%ebx
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
113129: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax
_ISR_Set_level(level);
11312f: 85 c0 test %eax,%eax
113131: 74 79 je 1131ac <_Thread_Handler+0x90>
113133: fa cli
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
113134: a0 cc 7a 12 00 mov 0x127acc,%al
113139: 88 45 f7 mov %al,-0x9(%ebp)
doneConstructors = 1;
11313c: c6 05 cc 7a 12 00 01 movb $0x1,0x127acc
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
113143: 8b 83 e0 00 00 00 mov 0xe0(%ebx),%eax
113149: 85 c0 test %eax,%eax
11314b: 74 24 je 113171 <_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 );
11314d: a1 e0 7e 12 00 mov 0x127ee0,%eax
113152: 39 c3 cmp %eax,%ebx
113154: 74 1b je 113171 <_Thread_Handler+0x55>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
113156: 85 c0 test %eax,%eax
113158: 74 11 je 11316b <_Thread_Handler+0x4f>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
11315a: 83 ec 0c sub $0xc,%esp
11315d: 05 e0 00 00 00 add $0xe0,%eax
113162: 50 push %eax
113163: e8 1c b9 ff ff call 10ea84 <_CPU_Context_save_fp>
113168: 83 c4 10 add $0x10,%esp
_Thread_Allocated_fp = executing;
11316b: 89 1d e0 7e 12 00 mov %ebx,0x127ee0
/*
* 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 );
113171: 83 ec 0c sub $0xc,%esp
113174: 53 push %ebx
113175: e8 26 b4 ff ff call 10e5a0 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
11317a: e8 89 a8 ff ff call 10da08 <_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) */ {
11317f: 83 c4 10 add $0x10,%esp
113182: 80 7d f7 00 cmpb $0x0,-0x9(%ebp)
113186: 74 28 je 1131b0 <_Thread_Handler+0x94>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
113188: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax
11318e: 85 c0 test %eax,%eax
113190: 74 2d je 1131bf <_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 ) {
113192: 48 dec %eax
113193: 74 43 je 1131d8 <_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 );
113195: 83 ec 0c sub $0xc,%esp
113198: 53 push %ebx
113199: e8 3e b4 ff ff call 10e5dc <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
11319e: 83 c4 0c add $0xc,%esp
1131a1: 6a 05 push $0x5
1131a3: 6a 01 push $0x1
1131a5: 6a 00 push $0x0
1131a7: e8 90 97 ff ff call 10c93c <_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);
1131ac: fb sti
1131ad: eb 85 jmp 113134 <_Thread_Handler+0x18>
1131af: 90 nop
* _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 ();
1131b0: e8 4b c7 00 00 call 11f900 <__start_set_sysctl_set>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
1131b5: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax
1131bb: 85 c0 test %eax,%eax
1131bd: 75 d3 jne 113192 <_Thread_Handler+0x76>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
1131bf: 83 ec 0c sub $0xc,%esp
1131c2: ff b3 9c 00 00 00 pushl 0x9c(%ebx)
1131c8: ff 93 90 00 00 00 call *0x90(%ebx)
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
1131ce: 89 43 28 mov %eax,0x28(%ebx)
1131d1: 83 c4 10 add $0x10,%esp
1131d4: eb bf jmp 113195 <_Thread_Handler+0x79>
1131d6: 66 90 xchg %ax,%ax
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
1131d8: 83 ec 0c sub $0xc,%esp
1131db: ff b3 98 00 00 00 pushl 0x98(%ebx)
1131e1: ff 93 90 00 00 00 call *0x90(%ebx)
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
1131e7: 89 43 28 mov %eax,0x28(%ebx)
1131ea: 83 c4 10 add $0x10,%esp
1131ed: eb a6 jmp 113195 <_Thread_Handler+0x79>
0010daa4 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
10daa4: 55 push %ebp
10daa5: 89 e5 mov %esp,%ebp
10daa7: 57 push %edi
10daa8: 56 push %esi
10daa9: 53 push %ebx
10daaa: 83 ec 1c sub $0x1c,%esp
10daad: 8b 5d 0c mov 0xc(%ebp),%ebx
10dab0: 8b 4d 10 mov 0x10(%ebp),%ecx
10dab3: 8b 75 14 mov 0x14(%ebp),%esi
10dab6: 8b 7d 1c mov 0x1c(%ebp),%edi
10dab9: 8a 55 18 mov 0x18(%ebp),%dl
10dabc: 8a 45 20 mov 0x20(%ebp),%al
10dabf: 88 45 df mov %al,-0x21(%ebp)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
10dac2: c7 83 e8 00 00 00 00 movl $0x0,0xe8(%ebx)
10dac9: 00 00 00
10dacc: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx)
10dad3: 00 00 00
extensions_area = NULL;
the_thread->libc_reent = NULL;
10dad6: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10dadd: 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 ) {
10dae0: 85 c9 test %ecx,%ecx
10dae2: 0f 84 d3 01 00 00 je 10dcbb <_Thread_Initialize+0x217>
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;
10dae8: c6 83 b4 00 00 00 00 movb $0x0,0xb4(%ebx)
10daef: 89 f0 mov %esi,%eax
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
10daf1: 89 8b bc 00 00 00 mov %ecx,0xbc(%ebx)
the_stack->size = size;
10daf7: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
10dafd: 84 d2 test %dl,%dl
10daff: 0f 85 4f 01 00 00 jne 10dc54 <_Thread_Initialize+0x1b0>
10db05: 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;
10db07: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%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;
10db0e: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx)
the_thread->Start.fp_context = fp_area;
10db14: 89 83 c0 00 00 00 mov %eax,0xc0(%ebx)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10db1a: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx)
the_watchdog->routine = routine;
10db21: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
the_watchdog->id = id;
10db28: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx)
the_watchdog->user_data = user_data;
10db2f: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
10db36: a1 f0 7e 12 00 mov 0x127ef0,%eax
10db3b: 85 c0 test %eax,%eax
10db3d: 0f 85 39 01 00 00 jne 10dc7c <_Thread_Initialize+0x1d8>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10db43: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx)
10db4a: 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;
10db4d: 31 f6 xor %esi,%esi
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
10db4f: 8a 45 df mov -0x21(%ebp),%al
10db52: 88 83 a0 00 00 00 mov %al,0xa0(%ebx)
the_thread->Start.budget_algorithm = budget_algorithm;
10db58: 8b 45 24 mov 0x24(%ebp),%eax
10db5b: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx)
the_thread->Start.budget_callout = budget_callout;
10db61: 8b 45 28 mov 0x28(%ebp),%eax
10db64: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx)
switch ( budget_algorithm ) {
10db6a: 83 7d 24 02 cmpl $0x2,0x24(%ebp)
10db6e: 75 08 jne 10db78 <_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;
10db70: a1 20 7e 12 00 mov 0x127e20,%eax
10db75: 89 43 78 mov %eax,0x78(%ebx)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
10db78: 8b 45 2c mov 0x2c(%ebp),%eax
10db7b: 89 83 ac 00 00 00 mov %eax,0xac(%ebx)
the_thread->current_state = STATES_DORMANT;
10db81: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx)
the_thread->Wait.queue = NULL;
10db88: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
the_thread->resource_count = 0;
10db8f: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->real_priority = priority;
10db96: 89 7b 18 mov %edi,0x18(%ebx)
the_thread->Start.initial_priority = priority;
10db99: 89 bb b0 00 00 00 mov %edi,0xb0(%ebx)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
10db9f: 83 ec 0c sub $0xc,%esp
10dba2: 53 push %ebx
10dba3: ff 15 58 3a 12 00 call *0x123a58
10dba9: 89 45 e4 mov %eax,-0x1c(%ebp)
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
10dbac: 83 c4 10 add $0x10,%esp
10dbaf: 85 c0 test %eax,%eax
10dbb1: 74 40 je 10dbf3 <_Thread_Initialize+0x14f>
goto failed;
_Thread_Set_priority( the_thread, priority );
10dbb3: 83 ec 08 sub $0x8,%esp
10dbb6: 57 push %edi
10dbb7: 53 push %ebx
10dbb8: e8 57 06 00 00 call 10e214 <_Thread_Set_priority>
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
10dbbd: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx)
10dbc4: 00 00 00
10dbc7: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx)
10dbce: 00 00 00
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10dbd1: 8b 45 08 mov 0x8(%ebp),%eax
10dbd4: 8b 40 1c mov 0x1c(%eax),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10dbd7: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10dbdb: 89 1c 90 mov %ebx,(%eax,%edx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10dbde: 8b 45 30 mov 0x30(%ebp),%eax
10dbe1: 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 );
10dbe4: 89 1c 24 mov %ebx,(%esp)
10dbe7: e8 7c 0a 00 00 call 10e668 <_User_extensions_Thread_create>
if ( extension_status )
10dbec: 83 c4 10 add $0x10,%esp
10dbef: 84 c0 test %al,%al
10dbf1: 75 55 jne 10dc48 <_Thread_Initialize+0x1a4>
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
10dbf3: 83 ec 0c sub $0xc,%esp
10dbf6: ff b3 e4 00 00 00 pushl 0xe4(%ebx)
10dbfc: e8 ff 0d 00 00 call 10ea00 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
10dc01: 5f pop %edi
10dc02: ff b3 e8 00 00 00 pushl 0xe8(%ebx)
10dc08: e8 f3 0d 00 00 call 10ea00 <_Workspace_Free>
10dc0d: 59 pop %ecx
10dc0e: ff b3 ec 00 00 00 pushl 0xec(%ebx)
10dc14: e8 e7 0d 00 00 call 10ea00 <_Workspace_Free>
_Workspace_Free( extensions_area );
10dc19: 89 34 24 mov %esi,(%esp)
10dc1c: e8 df 0d 00 00 call 10ea00 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
10dc21: 5a pop %edx
10dc22: ff 75 e0 pushl -0x20(%ebp)
10dc25: e8 d6 0d 00 00 call 10ea00 <_Workspace_Free>
#endif
_Workspace_Free( sched );
10dc2a: 58 pop %eax
10dc2b: ff 75 e4 pushl -0x1c(%ebp)
10dc2e: e8 cd 0d 00 00 call 10ea00 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
10dc33: 89 1c 24 mov %ebx,(%esp)
10dc36: e8 c1 06 00 00 call 10e2fc <_Thread_Stack_Free>
return false;
10dc3b: 83 c4 10 add $0x10,%esp
10dc3e: 31 c0 xor %eax,%eax
}
10dc40: 8d 65 f4 lea -0xc(%ebp),%esp
10dc43: 5b pop %ebx
10dc44: 5e pop %esi
10dc45: 5f pop %edi
10dc46: c9 leave
10dc47: 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;
10dc48: b0 01 mov $0x1,%al
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
10dc4a: 8d 65 f4 lea -0xc(%ebp),%esp
10dc4d: 5b pop %ebx
10dc4e: 5e pop %esi
10dc4f: 5f pop %edi
10dc50: c9 leave
10dc51: c3 ret
10dc52: 66 90 xchg %ax,%ax
/*
* 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 );
10dc54: 83 ec 0c sub $0xc,%esp
10dc57: 6a 6c push $0x6c
10dc59: e8 86 0d 00 00 call 10e9e4 <_Workspace_Allocate>
10dc5e: 89 45 e0 mov %eax,-0x20(%ebp)
if ( !fp_area )
10dc61: 83 c4 10 add $0x10,%esp
10dc64: 85 c0 test %eax,%eax
10dc66: 0f 85 a2 fe ff ff jne 10db0e <_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;
10dc6c: 31 f6 xor %esi,%esi
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
10dc6e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
10dc75: e9 79 ff ff ff jmp 10dbf3 <_Thread_Initialize+0x14f>
10dc7a: 66 90 xchg %ax,%ax
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
10dc7c: 83 ec 0c sub $0xc,%esp
10dc7f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax
10dc86: 50 push %eax
10dc87: e8 58 0d 00 00 call 10e9e4 <_Workspace_Allocate>
10dc8c: 89 c6 mov %eax,%esi
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
10dc8e: 83 c4 10 add $0x10,%esp
10dc91: 85 c0 test %eax,%eax
10dc93: 74 5a je 10dcef <_Thread_Initialize+0x24b>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10dc95: 89 83 f0 00 00 00 mov %eax,0xf0(%ebx)
10dc9b: 8b 0d f0 7e 12 00 mov 0x127ef0,%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++ )
10dca1: 31 d2 xor %edx,%edx
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
10dca3: 31 c0 xor %eax,%eax
10dca5: 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;
10dca8: 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++ )
10dcaf: 40 inc %eax
10dcb0: 89 c2 mov %eax,%edx
10dcb2: 39 c1 cmp %eax,%ecx
10dcb4: 73 f2 jae 10dca8 <_Thread_Initialize+0x204>
10dcb6: e9 94 fe ff ff jmp 10db4f <_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 );
10dcbb: 83 ec 08 sub $0x8,%esp
10dcbe: 56 push %esi
10dcbf: 53 push %ebx
10dcc0: 88 55 d8 mov %dl,-0x28(%ebp)
10dcc3: e8 d0 05 00 00 call 10e298 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
10dcc8: 83 c4 10 add $0x10,%esp
10dccb: 85 c0 test %eax,%eax
10dccd: 8a 55 d8 mov -0x28(%ebp),%dl
10dcd0: 74 16 je 10dce8 <_Thread_Initialize+0x244>
10dcd2: 39 c6 cmp %eax,%esi
10dcd4: 77 12 ja 10dce8 <_Thread_Initialize+0x244><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
10dcd6: 8b 8b c4 00 00 00 mov 0xc4(%ebx),%ecx
the_thread->Start.core_allocated_stack = true;
10dcdc: c6 83 b4 00 00 00 01 movb $0x1,0xb4(%ebx)
10dce3: e9 09 fe ff ff jmp 10daf1 <_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 */
10dce8: 31 c0 xor %eax,%eax
10dcea: e9 51 ff ff ff jmp 10dc40 <_Thread_Initialize+0x19c>
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
10dcef: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
10dcf6: e9 f8 fe ff ff jmp 10dbf3 <_Thread_Initialize+0x14f>
001125d4 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
1125d4: 55 push %ebp
1125d5: 89 e5 mov %esp,%ebp
1125d7: 53 push %ebx
1125d8: 83 ec 10 sub $0x10,%esp
1125db: 8b 5d 08 mov 0x8(%ebp),%ebx
the_thread->resource_count = 0;
1125de: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
1125e5: 8a 83 a0 00 00 00 mov 0xa0(%ebx),%al
1125eb: 88 43 74 mov %al,0x74(%ebx)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
1125ee: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax
1125f4: 89 43 7c mov %eax,0x7c(%ebx)
the_thread->budget_callout = the_thread->Start.budget_callout;
1125f7: 8b 83 a8 00 00 00 mov 0xa8(%ebx),%eax
1125fd: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
the_thread->Start.pointer_argument = pointer_argument;
112603: 8b 45 0c mov 0xc(%ebp),%eax
112606: 89 83 98 00 00 00 mov %eax,0x98(%ebx)
the_thread->Start.numeric_argument = numeric_argument;
11260c: 8b 45 10 mov 0x10(%ebp),%eax
11260f: 89 83 9c 00 00 00 mov %eax,0x9c(%ebx)
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
112615: 53 push %ebx
112616: e8 e1 c5 ff ff call 10ebfc <_Thread_queue_Extract_with_proxy>
11261b: 83 c4 10 add $0x10,%esp
11261e: 84 c0 test %al,%al
112620: 75 06 jne 112628 <_Thread_Reset+0x54>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
112622: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
112626: 74 28 je 112650 <_Thread_Reset+0x7c> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
112628: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax
11262e: 39 43 14 cmp %eax,0x14(%ebx)
112631: 74 15 je 112648 <_Thread_Reset+0x74>
the_thread->real_priority = the_thread->Start.initial_priority;
112633: 89 43 18 mov %eax,0x18(%ebx)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
112636: 89 45 0c mov %eax,0xc(%ebp)
112639: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
11263c: 8b 5d fc mov -0x4(%ebp),%ebx
11263f: 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 );
112640: e9 93 c7 ff ff jmp 10edd8 <_Thread_Set_priority>
112645: 8d 76 00 lea 0x0(%esi),%esi
}
}
112648: 8b 5d fc mov -0x4(%ebp),%ebx
11264b: c9 leave
11264c: c3 ret
11264d: 8d 76 00 lea 0x0(%esi),%esi
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
112650: 83 ec 0c sub $0xc,%esp
112653: 8d 43 48 lea 0x48(%ebx),%eax
112656: 50 push %eax
112657: e8 64 ce ff ff call 10f4c0 <_Watchdog_Remove>
11265c: 83 c4 10 add $0x10,%esp
11265f: eb c7 jmp 112628 <_Thread_Reset+0x54>
0011154c <_Thread_Resume>:
*/
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
11154c: 55 push %ebp
11154d: 89 e5 mov %esp,%ebp
11154f: 53 push %ebx
111550: 83 ec 04 sub $0x4,%esp
111553: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
111556: 9c pushf
111557: fa cli
111558: 5b pop %ebx
current_state = the_thread->current_state;
111559: 8b 50 10 mov 0x10(%eax),%edx
if ( current_state & STATES_SUSPENDED ) {
11155c: f6 c2 02 test $0x2,%dl
11155f: 74 0a je 11156b <_Thread_Resume+0x1f> <== NEVER TAKEN
111561: 83 e2 fd and $0xfffffffd,%edx
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
111564: 89 50 10 mov %edx,0x10(%eax)
if ( _States_Is_ready( current_state ) ) {
111567: 85 d2 test %edx,%edx
111569: 74 09 je 111574 <_Thread_Resume+0x28>
_Scheduler_Unblock( the_thread );
}
}
_ISR_Enable( level );
11156b: 53 push %ebx
11156c: 9d popf
}
11156d: 8b 5d fc mov -0x4(%ebp),%ebx
111570: c9 leave
111571: c3 ret
111572: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Unblock(
Thread_Control *the_thread
)
{
_Scheduler.Operations.unblock( the_thread );
111574: 83 ec 0c sub $0xc,%esp
111577: 50 push %eax
111578: ff 15 14 73 12 00 call *0x127314
11157e: 83 c4 10 add $0x10,%esp
111581: eb e8 jmp 11156b <_Thread_Resume+0x1f>
0010e298 <_Thread_Stack_Allocate>:
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
10e298: 55 push %ebp
10e299: 89 e5 mov %esp,%ebp
10e29b: 53 push %ebx
10e29c: 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;
10e29f: a1 30 3b 12 00 mov 0x123b30,%eax
10e2a4: 8b 5d 0c mov 0xc(%ebp),%ebx
10e2a7: 39 c3 cmp %eax,%ebx
10e2a9: 73 02 jae 10e2ad <_Thread_Stack_Allocate+0x15>
10e2ab: 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 ) {
10e2ad: a1 60 3b 12 00 mov 0x123b60,%eax
10e2b2: 85 c0 test %eax,%eax
10e2b4: 74 32 je 10e2e8 <_Thread_Stack_Allocate+0x50>
stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size );
10e2b6: 83 ec 0c sub $0xc,%esp
10e2b9: 53 push %ebx
10e2ba: ff d0 call *%eax
10e2bc: 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 )
10e2bf: 85 c0 test %eax,%eax
10e2c1: 74 11 je 10e2d4 <_Thread_Stack_Allocate+0x3c>
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
10e2c3: 8b 55 08 mov 0x8(%ebp),%edx
10e2c6: 89 82 c4 00 00 00 mov %eax,0xc4(%edx)
return the_stack_size;
}
10e2cc: 89 d8 mov %ebx,%eax
10e2ce: 8b 5d fc mov -0x4(%ebp),%ebx
10e2d1: c9 leave
10e2d2: c3 ret
10e2d3: 90 nop
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
the_stack_size = 0;
10e2d4: 31 db xor %ebx,%ebx
the_thread->Start.stack = stack_addr;
10e2d6: 8b 55 08 mov 0x8(%ebp),%edx
10e2d9: 89 82 c4 00 00 00 mov %eax,0xc4(%edx)
return the_stack_size;
}
10e2df: 89 d8 mov %ebx,%eax
10e2e1: 8b 5d fc mov -0x4(%ebp),%ebx
10e2e4: c9 leave
10e2e5: c3 ret
10e2e6: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size (
size_t size
)
{
return size + CPU_STACK_ALIGNMENT;
10e2e8: 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 );
10e2eb: 83 ec 0c sub $0xc,%esp
10e2ee: 53 push %ebx
10e2ef: e8 f0 06 00 00 call 10e9e4 <_Workspace_Allocate>
10e2f4: 83 c4 10 add $0x10,%esp
10e2f7: eb c6 jmp 10e2bf <_Thread_Stack_Allocate+0x27>
0010e2fc <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
10e2fc: 55 push %ebp
10e2fd: 89 e5 mov %esp,%ebp
10e2ff: 83 ec 08 sub $0x8,%esp
10e302: 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 )
10e305: 80 b8 b4 00 00 00 00 cmpb $0x0,0xb4(%eax)
10e30c: 74 16 je 10e324 <_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 )
10e30e: 8b 15 64 3b 12 00 mov 0x123b64,%edx
10e314: 85 d2 test %edx,%edx
10e316: 74 10 je 10e328 <_Thread_Stack_Free+0x2c>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
10e318: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax
10e31e: 89 45 08 mov %eax,0x8(%ebp)
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10e321: 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 );
10e322: ff e2 jmp *%edx
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
10e324: c9 leave
10e325: c3 ret
10e326: 66 90 xchg %ax,%ax
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
10e328: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax
10e32e: 89 45 08 mov %eax,0x8(%ebp)
}
10e331: 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 );
10e332: e9 c9 06 00 00 jmp 10ea00 <_Workspace_Free>
0011194c <_Thread_Suspend>:
* select map
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
11194c: 55 push %ebp
11194d: 89 e5 mov %esp,%ebp
11194f: 53 push %ebx
111950: 83 ec 04 sub $0x4,%esp
111953: 8b 45 08 mov 0x8(%ebp),%eax
ISR_Level level;
_ISR_Disable( level );
111956: 9c pushf
111957: fa cli
111958: 5b pop %ebx
if ( !_States_Is_ready( the_thread->current_state ) ) {
111959: 8b 50 10 mov 0x10(%eax),%edx
11195c: 85 d2 test %edx,%edx
11195e: 74 10 je 111970 <_Thread_Suspend+0x24>
111960: 83 ca 02 or $0x2,%edx
111963: 89 50 10 mov %edx,0x10(%eax)
the_thread->current_state =
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
111966: 53 push %ebx
111967: 9d popf
the_thread->current_state = STATES_SUSPENDED;
_Scheduler_Block( the_thread );
_ISR_Enable( level );
}
111968: 8b 5d fc mov -0x4(%ebp),%ebx
11196b: c9 leave
11196c: c3 ret
11196d: 8d 76 00 lea 0x0(%esi),%esi
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
111970: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax)
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Block(
Thread_Control *the_thread
)
{
_Scheduler.Operations.block( the_thread );
111977: 83 ec 0c sub $0xc,%esp
11197a: 50 push %eax
11197b: ff 15 50 3a 12 00 call *0x123a50
_Scheduler_Block( the_thread );
_ISR_Enable( level );
111981: 53 push %ebx
111982: 9d popf
111983: 83 c4 10 add $0x10,%esp
}
111986: 8b 5d fc mov -0x4(%ebp),%ebx
111989: c9 leave
11198a: c3 ret
0010e3f4 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
10e3f4: 55 push %ebp
10e3f5: 89 e5 mov %esp,%ebp
10e3f7: 53 push %ebx
10e3f8: 83 ec 04 sub $0x4,%esp
Thread_Control *executing;
executing = _Thread_Executing;
10e3fb: 8b 1d f8 83 12 00 mov 0x1283f8,%ebx
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
10e401: 80 7b 74 00 cmpb $0x0,0x74(%ebx)
10e405: 74 19 je 10e420 <_Thread_Tickle_timeslice+0x2c>
return;
if ( !_States_Is_ready( executing->current_state ) )
10e407: 8b 43 10 mov 0x10(%ebx),%eax
10e40a: 85 c0 test %eax,%eax
10e40c: 75 12 jne 10e420 <_Thread_Tickle_timeslice+0x2c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
10e40e: 8b 43 7c mov 0x7c(%ebx),%eax
10e411: 83 f8 01 cmp $0x1,%eax
10e414: 72 0a jb 10e420 <_Thread_Tickle_timeslice+0x2c>
10e416: 83 f8 02 cmp $0x2,%eax
10e419: 76 29 jbe 10e444 <_Thread_Tickle_timeslice+0x50>
10e41b: 83 f8 03 cmp $0x3,%eax
10e41e: 74 08 je 10e428 <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
10e420: 8b 5d fc mov -0x4(%ebp),%ebx
10e423: c9 leave
10e424: c3 ret
10e425: 8d 76 00 lea 0x0(%esi),%esi
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
10e428: 8b 43 78 mov 0x78(%ebx),%eax
10e42b: 48 dec %eax
10e42c: 89 43 78 mov %eax,0x78(%ebx)
10e42f: 85 c0 test %eax,%eax
10e431: 75 ed jne 10e420 <_Thread_Tickle_timeslice+0x2c>
(*executing->budget_callout)( executing );
10e433: 83 ec 0c sub $0xc,%esp
10e436: 53 push %ebx
10e437: ff 93 80 00 00 00 call *0x80(%ebx)
10e43d: 83 c4 10 add $0x10,%esp
10e440: eb de jmp 10e420 <_Thread_Tickle_timeslice+0x2c>
10e442: 66 90 xchg %ax,%ax
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 ) {
10e444: 8b 43 78 mov 0x78(%ebx),%eax
10e447: 48 dec %eax
10e448: 89 43 78 mov %eax,0x78(%ebx)
10e44b: 85 c0 test %eax,%eax
10e44d: 7f d1 jg 10e420 <_Thread_Tickle_timeslice+0x2c>
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
10e44f: ff 15 4c 3a 12 00 call *0x123a4c
* 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.
*/
_Scheduler_Yield( );
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
10e455: a1 20 7e 12 00 mov 0x127e20,%eax
10e45a: 89 43 78 mov %eax,0x78(%ebx)
10e45d: eb c1 jmp 10e420 <_Thread_Tickle_timeslice+0x2c>
0010ddd4 <_Thread_queue_Dequeue_priority>:
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
10ddd4: 55 push %ebp
10ddd5: 89 e5 mov %esp,%ebp
10ddd7: 57 push %edi
10ddd8: 56 push %esi
10ddd9: 53 push %ebx
10ddda: 83 ec 2c sub $0x2c,%esp
10dddd: 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 );
10dde0: 9c pushf
10dde1: fa cli
10dde2: 58 pop %eax
10dde3: 89 f9 mov %edi,%ecx
for( index=0 ;
10dde5: 31 d2 xor %edx,%edx
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10dde7: 8b 19 mov (%ecx),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10dde9: 8d 34 52 lea (%edx,%edx,2),%esi
10ddec: 8d 74 b7 04 lea 0x4(%edi,%esi,4),%esi
_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 ] ) ) {
10ddf0: 39 f3 cmp %esi,%ebx
10ddf2: 75 18 jne 10de0c <_Thread_queue_Dequeue_priority+0x38>
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
10ddf4: 42 inc %edx
10ddf5: 83 c1 0c add $0xc,%ecx
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
10ddf8: 83 fa 04 cmp $0x4,%edx
10ddfb: 75 ea jne 10dde7 <_Thread_queue_Dequeue_priority+0x13>
}
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
10ddfd: 50 push %eax
10ddfe: 9d popf
return NULL;
10ddff: 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 );
}
10de01: 89 f0 mov %esi,%eax
10de03: 8d 65 f4 lea -0xc(%ebp),%esp
10de06: 5b pop %ebx
10de07: 5e pop %esi
10de08: 5f pop %edi
10de09: c9 leave
10de0a: c3 ret
10de0b: 90 nop
_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 *) _Chain_First(
10de0c: 89 de mov %ebx,%esi
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
10de0e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10de15: 8b 53 38 mov 0x38(%ebx),%edx
dequeue:
the_thread->Wait.queue = NULL;
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
10de18: 8b 0b mov (%ebx),%ecx
previous_node = the_thread->Object.Node.previous;
10de1a: 8b 7b 04 mov 0x4(%ebx),%edi
10de1d: 89 7d d4 mov %edi,-0x2c(%ebp)
10de20: 8d 7b 3c lea 0x3c(%ebx),%edi
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
10de23: 39 fa cmp %edi,%edx
10de25: 74 7f je 10dea6 <_Thread_queue_Dequeue_priority+0xd2>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
10de27: 8b 7b 40 mov 0x40(%ebx),%edi
10de2a: 89 7d e4 mov %edi,-0x1c(%ebp)
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
10de2d: 8b 3a mov (%edx),%edi
10de2f: 89 7d e0 mov %edi,-0x20(%ebp)
previous_node->next = new_first_node;
10de32: 8b 7d d4 mov -0x2c(%ebp),%edi
10de35: 89 17 mov %edx,(%edi)
next_node->previous = new_first_node;
10de37: 89 51 04 mov %edx,0x4(%ecx)
new_first_node->next = next_node;
10de3a: 89 0a mov %ecx,(%edx)
new_first_node->previous = previous_node;
10de3c: 89 7a 04 mov %edi,0x4(%edx)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
10de3f: 8b 4b 40 mov 0x40(%ebx),%ecx
10de42: 39 4b 38 cmp %ecx,0x38(%ebx)
10de45: 74 17 je 10de5e <_Thread_queue_Dequeue_priority+0x8a>
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
10de47: 8d 4a 38 lea 0x38(%edx),%ecx
10de4a: 8b 7d e0 mov -0x20(%ebp),%edi
10de4d: 89 4f 04 mov %ecx,0x4(%edi)
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
10de50: 89 7a 38 mov %edi,0x38(%edx)
tail->previous = last_node;
10de53: 8b 4d e4 mov -0x1c(%ebp),%ecx
10de56: 89 4a 40 mov %ecx,0x40(%edx)
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
10de59: 83 c2 3c add $0x3c,%edx
10de5c: 89 11 mov %edx,(%ecx)
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
10de5e: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
10de62: 74 18 je 10de7c <_Thread_queue_Dequeue_priority+0xa8>
_ISR_Enable( level );
10de64: 50 push %eax
10de65: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
10de66: 83 ec 08 sub $0x8,%esp
10de69: 68 f8 ff 03 10 push $0x1003fff8
10de6e: 53 push %ebx
10de6f: e8 30 f8 ff ff call 10d6a4 <_Thread_Clear_state>
10de74: 83 c4 10 add $0x10,%esp
10de77: eb 88 jmp 10de01 <_Thread_queue_Dequeue_priority+0x2d>
10de79: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
10de7c: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
10de83: 50 push %eax
10de84: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
10de85: 83 ec 0c sub $0xc,%esp
10de88: 8d 43 48 lea 0x48(%ebx),%eax
10de8b: 50 push %eax
10de8c: e8 2b 0a 00 00 call 10e8bc <_Watchdog_Remove>
10de91: 58 pop %eax
10de92: 5a pop %edx
10de93: 68 f8 ff 03 10 push $0x1003fff8
10de98: 53 push %ebx
10de99: e8 06 f8 ff ff call 10d6a4 <_Thread_Clear_state>
10de9e: 83 c4 10 add $0x10,%esp
10dea1: e9 5b ff ff ff jmp 10de01 <_Thread_queue_Dequeue_priority+0x2d>
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
10dea6: 8b 7d d4 mov -0x2c(%ebp),%edi
10dea9: 89 0f mov %ecx,(%edi)
next_node->previous = previous_node;
10deab: 89 79 04 mov %edi,0x4(%ecx)
10deae: eb ae jmp 10de5e <_Thread_queue_Dequeue_priority+0x8a>
0010df48 <_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
)
{
10df48: 55 push %ebp
10df49: 89 e5 mov %esp,%ebp
10df4b: 57 push %edi
10df4c: 56 push %esi
10df4d: 53 push %ebx
10df4e: 83 ec 0c sub $0xc,%esp
10df51: 8b 7d 0c mov 0xc(%ebp),%edi
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10df54: 8d 47 3c lea 0x3c(%edi),%eax
10df57: 89 47 38 mov %eax,0x38(%edi)
head->next = tail;
head->previous = NULL;
10df5a: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10df61: 8d 47 38 lea 0x38(%edi),%eax
10df64: 89 47 40 mov %eax,0x40(%edi)
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
10df67: 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);
10df6a: 89 d0 mov %edx,%eax
10df6c: 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;
10df6f: 8b 4d 08 mov 0x8(%ebp),%ecx
10df72: 8b 59 38 mov 0x38(%ecx),%ebx
if ( _Thread_queue_Is_reverse_search( priority ) )
10df75: f6 c2 20 test $0x20,%dl
10df78: 75 66 jne 10dfe0 <_Thread_queue_Enqueue_priority+0x98>
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10df7a: 8d 04 40 lea (%eax,%eax,2),%eax
10df7d: 8d 04 81 lea (%ecx,%eax,4),%eax
10df80: 89 45 f0 mov %eax,-0x10(%ebp)
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
10df83: 83 c0 04 add $0x4,%eax
10df86: 89 7d e8 mov %edi,-0x18(%ebp)
10df89: 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 );
10df8b: 9c pushf
10df8c: fa cli
10df8d: 5e pop %esi
10df8e: 89 75 ec mov %esi,-0x14(%ebp)
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10df91: 8b 4d f0 mov -0x10(%ebp),%ecx
10df94: 8b 01 mov (%ecx),%eax
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10df96: 39 f8 cmp %edi,%eax
10df98: 75 18 jne 10dfb2 <_Thread_queue_Enqueue_priority+0x6a>
10df9a: e9 0e 01 00 00 jmp 10e0ad <_Thread_queue_Enqueue_priority+0x165>
10df9f: 90 nop
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
10dfa0: 56 push %esi
10dfa1: 9d popf
10dfa2: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10dfa3: 85 58 10 test %ebx,0x10(%eax)
10dfa6: 0f 84 ac 00 00 00 je 10e058 <_Thread_queue_Enqueue_priority+0x110><== NEVER TAKEN
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
10dfac: 8b 00 mov (%eax),%eax
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
10dfae: 39 f8 cmp %edi,%eax
10dfb0: 74 07 je 10dfb9 <_Thread_queue_Enqueue_priority+0x71>
search_priority = search_thread->current_priority;
10dfb2: 8b 48 14 mov 0x14(%eax),%ecx
if ( priority <= search_priority )
10dfb5: 39 ca cmp %ecx,%edx
10dfb7: 77 e7 ja 10dfa0 <_Thread_queue_Enqueue_priority+0x58>
10dfb9: 8b 7d e8 mov -0x18(%ebp),%edi
10dfbc: 89 75 f0 mov %esi,-0x10(%ebp)
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
10dfbf: 8b 75 08 mov 0x8(%ebp),%esi
10dfc2: 8b 5e 30 mov 0x30(%esi),%ebx
10dfc5: 83 fb 01 cmp $0x1,%ebx
10dfc8: 0f 84 92 00 00 00 je 10e060 <_Thread_queue_Enqueue_priority+0x118>
* 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;
10dfce: 8b 45 10 mov 0x10(%ebp),%eax
10dfd1: 8b 55 ec mov -0x14(%ebp),%edx
10dfd4: 89 10 mov %edx,(%eax)
return the_thread_queue->sync_state;
}
10dfd6: 89 d8 mov %ebx,%eax
10dfd8: 83 c4 0c add $0xc,%esp
10dfdb: 5b pop %ebx
10dfdc: 5e pop %esi
10dfdd: 5f pop %edi
10dfde: c9 leave
10dfdf: c3 ret
10dfe0: 8d 04 40 lea (%eax,%eax,2),%eax
10dfe3: 8b 4d 08 mov 0x8(%ebp),%ecx
10dfe6: 8d 34 81 lea (%ecx,%eax,4),%esi
10dfe9: 89 7d f0 mov %edi,-0x10(%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;
10dfec: 0f b6 0d 34 3b 12 00 movzbl 0x123b34,%ecx
10dff3: 41 inc %ecx
_ISR_Disable( level );
10dff4: 9c pushf
10dff5: fa cli
10dff6: 5f pop %edi
10dff7: 89 7d ec mov %edi,-0x14(%ebp)
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10dffa: 8b 46 08 mov 0x8(%esi),%eax
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10dffd: 39 f0 cmp %esi,%eax
10dfff: 75 12 jne 10e013 <_Thread_queue_Enqueue_priority+0xcb>
10e001: eb 17 jmp 10e01a <_Thread_queue_Enqueue_priority+0xd2>
10e003: 90 nop
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
10e004: 57 push %edi
10e005: 9d popf
10e006: fa cli
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
10e007: 85 58 10 test %ebx,0x10(%eax)
10e00a: 74 48 je 10e054 <_Thread_queue_Enqueue_priority+0x10c>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
10e00c: 8b 40 04 mov 0x4(%eax),%eax
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
10e00f: 39 f0 cmp %esi,%eax
10e011: 74 07 je 10e01a <_Thread_queue_Enqueue_priority+0xd2>
search_priority = search_thread->current_priority;
10e013: 8b 48 14 mov 0x14(%eax),%ecx
if ( priority >= search_priority )
10e016: 39 ca cmp %ecx,%edx
10e018: 72 ea jb 10e004 <_Thread_queue_Enqueue_priority+0xbc>
10e01a: 89 7d e8 mov %edi,-0x18(%ebp)
10e01d: 8b 7d f0 mov -0x10(%ebp),%edi
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
10e020: 8b 75 08 mov 0x8(%ebp),%esi
10e023: 8b 5e 30 mov 0x30(%esi),%ebx
10e026: 83 fb 01 cmp $0x1,%ebx
10e029: 75 a3 jne 10dfce <_Thread_queue_Enqueue_priority+0x86>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10e02b: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
if ( priority == search_priority )
10e032: 39 ca cmp %ecx,%edx
10e034: 74 53 je 10e089 <_Thread_queue_Enqueue_priority+0x141>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
10e036: 8b 10 mov (%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
10e038: 89 17 mov %edx,(%edi)
the_node->previous = search_node;
10e03a: 89 47 04 mov %eax,0x4(%edi)
search_node->next = the_node;
10e03d: 89 38 mov %edi,(%eax)
next_node->previous = the_node;
10e03f: 89 7a 04 mov %edi,0x4(%edx)
the_thread->Wait.queue = the_thread_queue;
10e042: 89 77 44 mov %esi,0x44(%edi)
_ISR_Enable( level );
10e045: ff 75 e8 pushl -0x18(%ebp)
10e048: 9d popf
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10e049: 89 d8 mov %ebx,%eax
10e04b: 83 c4 0c add $0xc,%esp
10e04e: 5b pop %ebx
10e04f: 5e pop %esi
10e050: 5f pop %edi
10e051: c9 leave
10e052: c3 ret
10e053: 90 nop
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10e054: 57 push %edi
10e055: 9d popf
goto restart_reverse_search;
10e056: eb 94 jmp 10dfec <_Thread_queue_Enqueue_priority+0xa4>
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
10e058: 56 push %esi <== NOT EXECUTED
10e059: 9d popf <== NOT EXECUTED
goto restart_forward_search;
10e05a: e9 2c ff ff ff jmp 10df8b <_Thread_queue_Enqueue_priority+0x43><== NOT EXECUTED
10e05f: 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;
10e060: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi)
if ( priority == search_priority )
10e067: 39 ca cmp %ecx,%edx
10e069: 74 1e je 10e089 <_Thread_queue_Enqueue_priority+0x141>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
10e06b: 8b 50 04 mov 0x4(%eax),%edx
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
10e06e: 89 07 mov %eax,(%edi)
the_node->previous = previous_node;
10e070: 89 57 04 mov %edx,0x4(%edi)
previous_node->next = the_node;
10e073: 89 3a mov %edi,(%edx)
search_node->previous = the_node;
10e075: 89 78 04 mov %edi,0x4(%eax)
the_thread->Wait.queue = the_thread_queue;
10e078: 89 77 44 mov %esi,0x44(%edi)
_ISR_Enable( level );
10e07b: ff 75 f0 pushl -0x10(%ebp)
10e07e: 9d popf
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
10e07f: 89 d8 mov %ebx,%eax
10e081: 83 c4 0c add $0xc,%esp
10e084: 5b pop %ebx
10e085: 5e pop %esi
10e086: 5f pop %edi
10e087: c9 leave
10e088: c3 ret
_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;
10e089: 8b 50 40 mov 0x40(%eax),%edx
the_thread->Wait.queue = the_thread_queue;
_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 );
10e08c: 8d 48 3c lea 0x3c(%eax),%ecx
10e08f: 89 0f mov %ecx,(%edi)
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
10e091: 89 57 04 mov %edx,0x4(%edi)
previous_node->next = the_node;
10e094: 89 3a mov %edi,(%edx)
search_node->previous = the_node;
10e096: 89 78 40 mov %edi,0x40(%eax)
the_thread->Wait.queue = the_thread_queue;
10e099: 8b 45 08 mov 0x8(%ebp),%eax
10e09c: 89 47 44 mov %eax,0x44(%edi)
_ISR_Enable( level );
10e09f: ff 75 ec pushl -0x14(%ebp)
10e0a2: 9d popf
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
10e0a3: bb 01 00 00 00 mov $0x1,%ebx
10e0a8: e9 29 ff ff ff jmp 10dfd6 <_Thread_queue_Enqueue_priority+0x8e>
10e0ad: 8b 7d e8 mov -0x18(%ebp),%edi
10e0b0: 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;
10e0b3: b9 ff ff ff ff mov $0xffffffff,%ecx
10e0b8: e9 02 ff ff ff jmp 10dfbf <_Thread_queue_Enqueue_priority+0x77>
001117f4 <_Thread_queue_Extract>:
void _Thread_queue_Extract(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
1117f4: 55 push %ebp
1117f5: 89 e5 mov %esp,%ebp
1117f7: 83 ec 08 sub $0x8,%esp
1117fa: 8b 45 08 mov 0x8(%ebp),%eax
1117fd: 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 )
111800: 83 78 34 01 cmpl $0x1,0x34(%eax)
111804: 74 0e je 111814 <_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 );
111806: 89 55 0c mov %edx,0xc(%ebp)
111809: 89 45 08 mov %eax,0x8(%ebp)
}
11180c: 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 );
11180d: e9 de 19 00 00 jmp 1131f0 <_Thread_queue_Extract_fifo>
111812: 66 90 xchg %ax,%ax
/*
* Can not use indirect function pointer here since Extract priority
* is a macro and the underlying methods do not have the same signature.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
_Thread_queue_Extract_priority( the_thread_queue, the_thread );
111814: 51 push %ecx
111815: 6a 00 push $0x0
111817: 52 push %edx
111818: 50 push %eax
111819: e8 06 00 00 00 call 111824 <_Thread_queue_Extract_priority_helper>
11181e: 83 c4 10 add $0x10,%esp
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Thread_queue_Extract_fifo( the_thread_queue, the_thread );
}
111821: c9 leave
111822: c3 ret
001131f0 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
1131f0: 55 push %ebp
1131f1: 89 e5 mov %esp,%ebp
1131f3: 53 push %ebx
1131f4: 83 ec 04 sub $0x4,%esp
1131f7: 8b 5d 0c mov 0xc(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
1131fa: 9c pushf
1131fb: fa cli
1131fc: 58 pop %eax
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
1131fd: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
113204: 74 2e je 113234 <_Thread_queue_Extract_fifo+0x44>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
113206: 8b 0b mov (%ebx),%ecx
previous = the_node->previous;
113208: 8b 53 04 mov 0x4(%ebx),%edx
next->previous = previous;
11320b: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
11320e: 89 0a mov %ecx,(%edx)
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
113210: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
113217: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
11321b: 74 1f je 11323c <_Thread_queue_Extract_fifo+0x4c>
_ISR_Enable( level );
11321d: 50 push %eax
11321e: 9d popf
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
11321f: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
113226: 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
}
113229: 8b 5d fc mov -0x4(%ebp),%ebx
11322c: c9 leave
11322d: e9 72 a4 ff ff jmp 10d6a4 <_Thread_Clear_state>
113232: 66 90 xchg %ax,%ax
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
113234: 50 push %eax
113235: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
113236: 8b 5d fc mov -0x4(%ebp),%ebx
113239: c9 leave
11323a: c3 ret
11323b: 90 nop
11323c: 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 );
113243: 50 push %eax
113244: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
113245: 83 ec 0c sub $0xc,%esp
113248: 8d 43 48 lea 0x48(%ebx),%eax
11324b: 50 push %eax
11324c: e8 6b b6 ff ff call 10e8bc <_Watchdog_Remove>
113251: 83 c4 10 add $0x10,%esp
113254: eb c9 jmp 11321f <_Thread_queue_Extract_fifo+0x2f>
00111824 <_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
)
{
111824: 55 push %ebp
111825: 89 e5 mov %esp,%ebp
111827: 57 push %edi
111828: 56 push %esi
111829: 53 push %ebx
11182a: 83 ec 1c sub $0x1c,%esp
11182d: 8b 5d 0c mov 0xc(%ebp),%ebx
111830: 8a 45 10 mov 0x10(%ebp),%al
111833: 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 );
111836: 9c pushf
111837: fa cli
111838: 8f 45 e4 popl -0x1c(%ebp)
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
11183b: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx)
111842: 74 6c je 1118b0 <_Thread_queue_Extract_priority_helper+0x8c>
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
111844: 8b 13 mov (%ebx),%edx
previous_node = the_node->previous;
111846: 8b 4b 04 mov 0x4(%ebx),%ecx
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
111849: 8b 43 38 mov 0x38(%ebx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11184c: 8d 73 3c lea 0x3c(%ebx),%esi
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
11184f: 39 f0 cmp %esi,%eax
111851: 74 69 je 1118bc <_Thread_queue_Extract_priority_helper+0x98>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
111853: 8b 7b 40 mov 0x40(%ebx),%edi
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
111856: 8b 30 mov (%eax),%esi
previous_node->next = new_first_node;
111858: 89 01 mov %eax,(%ecx)
next_node->previous = new_first_node;
11185a: 89 42 04 mov %eax,0x4(%edx)
new_first_node->next = next_node;
11185d: 89 10 mov %edx,(%eax)
new_first_node->previous = previous_node;
11185f: 89 48 04 mov %ecx,0x4(%eax)
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
111862: 8b 53 40 mov 0x40(%ebx),%edx
111865: 39 53 38 cmp %edx,0x38(%ebx)
111868: 74 11 je 11187b <_Thread_queue_Extract_priority_helper+0x57>
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
11186a: 8d 50 38 lea 0x38(%eax),%edx
11186d: 89 56 04 mov %edx,0x4(%esi)
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
111870: 89 70 38 mov %esi,0x38(%eax)
tail->previous = last_node;
111873: 89 78 40 mov %edi,0x40(%eax)
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
111876: 83 c0 3c add $0x3c,%eax
111879: 89 07 mov %eax,(%edi)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
11187b: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp)
11187f: 75 23 jne 1118a4 <_Thread_queue_Extract_priority_helper+0x80>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
111881: 83 7b 50 02 cmpl $0x2,0x50(%ebx)
111885: 74 3d je 1118c4 <_Thread_queue_Extract_priority_helper+0xa0>
_ISR_Enable( level );
111887: ff 75 e4 pushl -0x1c(%ebp)
11188a: 9d popf
11188b: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp)
111892: 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
}
111895: 8d 65 f4 lea -0xc(%ebp),%esp
111898: 5b pop %ebx
111899: 5e pop %esi
11189a: 5f pop %edi
11189b: c9 leave
11189c: e9 03 be ff ff jmp 10d6a4 <_Thread_Clear_state>
1118a1: 8d 76 00 lea 0x0(%esi),%esi
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
1118a4: ff 75 e4 pushl -0x1c(%ebp)
1118a7: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
1118a8: 8d 65 f4 lea -0xc(%ebp),%esp
1118ab: 5b pop %ebx
1118ac: 5e pop %esi
1118ad: 5f pop %edi
1118ae: c9 leave
1118af: 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 );
1118b0: ff 75 e4 pushl -0x1c(%ebp)
1118b3: 9d popf
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
1118b4: 8d 65 f4 lea -0xc(%ebp),%esp
1118b7: 5b pop %ebx
1118b8: 5e pop %esi
1118b9: 5f pop %edi
1118ba: c9 leave
1118bb: c3 ret
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
1118bc: 89 11 mov %edx,(%ecx)
next_node->previous = previous_node;
1118be: 89 4a 04 mov %ecx,0x4(%edx)
1118c1: eb b8 jmp 11187b <_Thread_queue_Extract_priority_helper+0x57>
1118c3: 90 nop
1118c4: 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 );
1118cb: ff 75 e4 pushl -0x1c(%ebp)
1118ce: 9d popf
(void) _Watchdog_Remove( &the_thread->Timer );
1118cf: 83 ec 0c sub $0xc,%esp
1118d2: 8d 43 48 lea 0x48(%ebx),%eax
1118d5: 50 push %eax
1118d6: e8 e1 cf ff ff call 10e8bc <_Watchdog_Remove>
1118db: 83 c4 10 add $0x10,%esp
1118de: eb ab jmp 11188b <_Thread_queue_Extract_priority_helper+0x67>
0010e0c0 <_Thread_queue_Extract_with_proxy>:
*/
bool _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread
)
{
10e0c0: 55 push %ebp
10e0c1: 89 e5 mov %esp,%ebp
10e0c3: 83 ec 08 sub $0x8,%esp
10e0c6: 8b 45 08 mov 0x8(%ebp),%eax
States_Control state;
state = the_thread->current_state;
if ( _States_Is_waiting_on_thread_queue( state ) ) {
10e0c9: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax)
10e0d0: 75 06 jne 10e0d8 <_Thread_queue_Extract_with_proxy+0x18>
#endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
return true;
}
return false;
10e0d2: 31 c0 xor %eax,%eax
}
10e0d4: c9 leave
10e0d5: c3 ret
10e0d6: 66 90 xchg %ax,%ax
if ( proxy_extract_callout )
(*proxy_extract_callout)( the_thread );
}
#endif
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
10e0d8: 83 ec 08 sub $0x8,%esp
10e0db: 50 push %eax
10e0dc: ff 70 44 pushl 0x44(%eax)
10e0df: e8 10 37 00 00 call 1117f4 <_Thread_queue_Extract>
return true;
10e0e4: 83 c4 10 add $0x10,%esp
10e0e7: b0 01 mov $0x1,%al
}
return false;
}
10e0e9: c9 leave
10e0ea: c3 ret
0010ff28 <_Thread_queue_First>:
*/
Thread_Control *_Thread_queue_First(
Thread_queue_Control *the_thread_queue
)
{
10ff28: 55 push %ebp
10ff29: 89 e5 mov %esp,%ebp
10ff2b: 83 ec 08 sub $0x8,%esp
10ff2e: 8b 45 08 mov 0x8(%ebp),%eax
Thread_Control * (*first_p)(Thread_queue_Control *);
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
10ff31: 83 78 34 01 cmpl $0x1,0x34(%eax)
10ff35: 74 0d je 10ff44 <_Thread_queue_First+0x1c>
first_p = _Thread_queue_First_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
10ff37: ba 88 37 11 00 mov $0x113788,%edx
return (*first_p)( the_thread_queue );
10ff3c: 89 45 08 mov %eax,0x8(%ebp)
}
10ff3f: 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 );
10ff40: ff e2 jmp *%edx
10ff42: 66 90 xchg %ax,%ax
)
{
Thread_Control * (*first_p)(Thread_queue_Control *);
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
first_p = _Thread_queue_First_priority;
10ff44: ba 50 ff 10 00 mov $0x10ff50,%edx
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
first_p = _Thread_queue_First_fifo;
return (*first_p)( the_thread_queue );
10ff49: 89 45 08 mov %eax,0x8(%ebp)
}
10ff4c: 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 );
10ff4d: ff e2 jmp *%edx
00113788 <_Thread_queue_First_fifo>:
*/
Thread_Control *_Thread_queue_First_fifo(
Thread_queue_Control *the_thread_queue
)
{
113788: 55 push %ebp
113789: 89 e5 mov %esp,%ebp
11378b: 8b 55 08 mov 0x8(%ebp),%edx
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo );
return NULL;
}
11378e: 8b 02 mov (%edx),%eax
113790: 83 c2 04 add $0x4,%edx
Thread_Control *_Thread_queue_First_fifo(
Thread_queue_Control *the_thread_queue
)
{
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
113793: 39 d0 cmp %edx,%eax
113795: 74 05 je 11379c <_Thread_queue_First_fifo+0x14>
return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo );
return NULL;
}
113797: c9 leave
113798: c3 ret
113799: 8d 76 00 lea 0x0(%esi),%esi
)
{
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo );
return NULL;
11379c: 31 c0 xor %eax,%eax
}
11379e: c9 leave
11379f: c3 ret
0010e0ec <_Thread_queue_Flush>:
#else
Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)),
#endif
uint32_t status
)
{
10e0ec: 55 push %ebp
10e0ed: 89 e5 mov %esp,%ebp
10e0ef: 56 push %esi
10e0f0: 53 push %ebx
10e0f1: 8b 5d 08 mov 0x8(%ebp),%ebx
10e0f4: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10e0f7: eb 06 jmp 10e0ff <_Thread_queue_Flush+0x13>
10e0f9: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
10e0fc: 89 70 34 mov %esi,0x34(%eax)
uint32_t status
)
{
Thread_Control *the_thread;
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
10e0ff: 83 ec 0c sub $0xc,%esp
10e102: 53 push %ebx
10e103: e8 80 fc ff ff call 10dd88 <_Thread_queue_Dequeue>
10e108: 83 c4 10 add $0x10,%esp
10e10b: 85 c0 test %eax,%eax
10e10d: 75 ed jne 10e0fc <_Thread_queue_Flush+0x10>
( *remote_extract_callout )( the_thread );
else
#endif
the_thread->Wait.return_code = status;
}
}
10e10f: 8d 65 f8 lea -0x8(%ebp),%esp
10e112: 5b pop %ebx
10e113: 5e pop %esi
10e114: c9 leave
10e115: c3 ret
0010e118 <_Thread_queue_Initialize>:
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
10e118: 55 push %ebp
10e119: 89 e5 mov %esp,%ebp
10e11b: 56 push %esi
10e11c: 53 push %ebx
10e11d: 8b 45 08 mov 0x8(%ebp),%eax
10e120: 8b 55 0c mov 0xc(%ebp),%edx
the_thread_queue->state = state;
10e123: 8b 4d 10 mov 0x10(%ebp),%ecx
10e126: 89 48 38 mov %ecx,0x38(%eax)
the_thread_queue->discipline = the_discipline;
10e129: 89 50 34 mov %edx,0x34(%eax)
the_thread_queue->timeout_status = timeout_status;
10e12c: 8b 4d 14 mov 0x14(%ebp),%ecx
10e12f: 89 48 3c mov %ecx,0x3c(%eax)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
10e132: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
10e139: 83 fa 01 cmp $0x1,%edx
10e13c: 74 16 je 10e154 <_Thread_queue_Initialize+0x3c>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10e13e: 8d 50 04 lea 0x4(%eax),%edx
10e141: 89 10 mov %edx,(%eax)
head->next = tail;
head->previous = NULL;
10e143: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
tail->previous = head;
10e14a: 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 );
}
}
10e14d: 5b pop %ebx
10e14e: 5e pop %esi
10e14f: c9 leave
10e150: c3 ret
10e151: 8d 76 00 lea 0x0(%esi),%esi
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 ) {
10e154: 89 c1 mov %eax,%ecx
10e156: 30 d2 xor %dl,%dl
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10e158: 8d 1c 52 lea (%edx,%edx,2),%ebx
10e15b: 8d 1c 98 lea (%eax,%ebx,4),%ebx
10e15e: 8d 73 04 lea 0x4(%ebx),%esi
10e161: 89 31 mov %esi,(%ecx)
head->next = tail;
head->previous = NULL;
10e163: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10e16a: 89 59 08 mov %ebx,0x8(%ecx)
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
10e16d: 42 inc %edx
10e16e: 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 ;
10e171: 83 fa 04 cmp $0x4,%edx
10e174: 75 e2 jne 10e158 <_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 );
}
}
10e176: 5b pop %ebx
10e177: 5e pop %esi
10e178: c9 leave
10e179: c3 ret
0010e17c <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
10e17c: 55 push %ebp
10e17d: 89 e5 mov %esp,%ebp
10e17f: 57 push %edi
10e180: 56 push %esi
10e181: 53 push %ebx
10e182: 83 ec 1c sub $0x1c,%esp
10e185: 8b 75 08 mov 0x8(%ebp),%esi
10e188: 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 )
10e18b: 85 f6 test %esi,%esi
10e18d: 74 06 je 10e195 <_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 ) {
10e18f: 83 7e 34 01 cmpl $0x1,0x34(%esi)
10e193: 74 0b je 10e1a0 <_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 );
}
}
10e195: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10e198: 5b pop %ebx <== NOT EXECUTED
10e199: 5e pop %esi <== NOT EXECUTED
10e19a: 5f pop %edi <== NOT EXECUTED
10e19b: c9 leave <== NOT EXECUTED
10e19c: c3 ret <== NOT EXECUTED
10e19d: 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 );
10e1a0: 9c pushf
10e1a1: fa cli
10e1a2: 5b pop %ebx
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
10e1a3: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi)
10e1aa: 75 0c jne 10e1b8 <_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 );
10e1ac: 53 push %ebx
10e1ad: 9d popf
}
}
10e1ae: 8d 65 f4 lea -0xc(%ebp),%esp
10e1b1: 5b pop %ebx
10e1b2: 5e pop %esi
10e1b3: 5f pop %edi
10e1b4: c9 leave
10e1b5: c3 ret
10e1b6: 66 90 xchg %ax,%ax
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;
10e1b8: 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 );
10e1bf: 50 push %eax
10e1c0: 6a 01 push $0x1
10e1c2: 57 push %edi
10e1c3: 56 push %esi
10e1c4: e8 5b 36 00 00 call 111824 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
10e1c9: 83 c4 0c add $0xc,%esp
10e1cc: 8d 45 e4 lea -0x1c(%ebp),%eax
10e1cf: 50 push %eax
10e1d0: 57 push %edi
10e1d1: 56 push %esi
10e1d2: e8 71 fd ff ff call 10df48 <_Thread_queue_Enqueue_priority>
10e1d7: 83 c4 10 add $0x10,%esp
10e1da: eb d0 jmp 10e1ac <_Thread_queue_Requeue+0x30>
0010e1dc <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
10e1dc: 55 push %ebp
10e1dd: 89 e5 mov %esp,%ebp
10e1df: 83 ec 20 sub $0x20,%esp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10e1e2: 8d 45 f4 lea -0xc(%ebp),%eax
10e1e5: 50 push %eax
10e1e6: ff 75 08 pushl 0x8(%ebp)
10e1e9: e8 3e f8 ff ff call 10da2c <_Thread_Get>
switch ( location ) {
10e1ee: 83 c4 10 add $0x10,%esp
10e1f1: 8b 55 f4 mov -0xc(%ebp),%edx
10e1f4: 85 d2 test %edx,%edx
10e1f6: 75 17 jne 10e20f <_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 );
10e1f8: 83 ec 0c sub $0xc,%esp
10e1fb: 50 push %eax
10e1fc: e8 df 36 00 00 call 1118e0 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
10e201: a1 50 7e 12 00 mov 0x127e50,%eax
10e206: 48 dec %eax
10e207: a3 50 7e 12 00 mov %eax,0x127e50
10e20c: 83 c4 10 add $0x10,%esp
_Thread_Unnest_dispatch();
break;
}
}
10e20f: c9 leave
10e210: c3 ret
00118e00 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
118e00: 55 push %ebp
118e01: 89 e5 mov %esp,%ebp
118e03: 57 push %edi
118e04: 56 push %esi
118e05: 53 push %ebx
118e06: 83 ec 4c sub $0x4c,%esp
118e09: 8b 5d 08 mov 0x8(%ebp),%ebx
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
118e0c: 8d 45 e0 lea -0x20(%ebp),%eax
118e0f: 89 45 b4 mov %eax,-0x4c(%ebp)
118e12: 89 45 dc mov %eax,-0x24(%ebp)
head->previous = NULL;
118e15: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
tail->previous = head;
118e1c: 8d 4d dc lea -0x24(%ebp),%ecx
118e1f: 89 4d e4 mov %ecx,-0x1c(%ebp)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
118e22: 8d 7d d0 lea -0x30(%ebp),%edi
118e25: 8d 45 d4 lea -0x2c(%ebp),%eax
118e28: 89 45 b0 mov %eax,-0x50(%ebp)
118e2b: 89 45 d0 mov %eax,-0x30(%ebp)
head->previous = NULL;
118e2e: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
tail->previous = head;
118e35: 89 7d d8 mov %edi,-0x28(%ebp)
118e38: 8d 73 30 lea 0x30(%ebx),%esi
118e3b: 8d 4b 68 lea 0x68(%ebx),%ecx
118e3e: 89 4d c4 mov %ecx,-0x3c(%ebp)
118e41: 8d 43 08 lea 0x8(%ebx),%eax
118e44: 89 45 bc mov %eax,-0x44(%ebp)
118e47: 8d 53 40 lea 0x40(%ebx),%edx
118e4a: 89 55 c0 mov %edx,-0x40(%ebp)
118e4d: 8d 76 00 lea 0x0(%esi),%esi
Chain_Control *tmp;
/*
* 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;
118e50: 8d 4d dc lea -0x24(%ebp),%ecx
118e53: 89 4b 78 mov %ecx,0x78(%ebx)
118e56: 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;
118e58: a1 24 2c 14 00 mov 0x142c24,%eax
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
118e5d: 8b 53 3c mov 0x3c(%ebx),%edx
watchdogs->last_snapshot = snapshot;
118e60: 89 43 3c mov %eax,0x3c(%ebx)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118e63: 51 push %ecx
118e64: 57 push %edi
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
118e65: 29 d0 sub %edx,%eax
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118e67: 50 push %eax
118e68: 56 push %esi
118e69: e8 c6 3f 00 00 call 11ce34 <_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();
118e6e: a1 88 2b 14 00 mov 0x142b88,%eax
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
118e73: 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 ) {
118e76: 83 c4 10 add $0x10,%esp
118e79: 39 d0 cmp %edx,%eax
118e7b: 0f 87 af 00 00 00 ja 118f30 <_Timer_server_Body+0x130>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
118e81: 0f 82 c9 00 00 00 jb 118f50 <_Timer_server_Body+0x150>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
118e87: 89 43 74 mov %eax,0x74(%ebx)
118e8a: 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 );
118e8c: 8b 43 78 mov 0x78(%ebx),%eax
118e8f: 83 ec 0c sub $0xc,%esp
118e92: 50 push %eax
118e93: e8 0c 0a 00 00 call 1198a4 <_Chain_Get>
if ( timer == NULL ) {
118e98: 83 c4 10 add $0x10,%esp
118e9b: 85 c0 test %eax,%eax
118e9d: 74 35 je 118ed4 <_Timer_server_Body+0xd4><== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
118e9f: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED
118ea2: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED
118ea5: 74 19 je 118ec0 <_Timer_server_Body+0xc0><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
118ea7: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED
118eaa: 75 e0 jne 118e8c <_Timer_server_Body+0x8c><== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
118eac: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
118eaf: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
118eb2: 50 push %eax <== NOT EXECUTED
118eb3: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
118eb6: e8 05 40 00 00 call 11cec0 <_Watchdog_Insert> <== NOT EXECUTED
118ebb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
118ebe: eb cc jmp 118e8c <_Timer_server_Body+0x8c><== 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 );
118ec0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
118ec3: 83 c0 10 add $0x10,%eax <== NOT EXECUTED
118ec6: 50 push %eax <== NOT EXECUTED
118ec7: 56 push %esi <== NOT EXECUTED
118ec8: e8 f3 3f 00 00 call 11cec0 <_Watchdog_Insert> <== NOT EXECUTED
118ecd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
118ed0: eb ba jmp 118e8c <_Timer_server_Body+0x8c><== NOT EXECUTED
118ed2: 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 );
118ed4: 9c pushf
118ed5: fa cli
118ed6: 58 pop %eax
tmp = ts->insert_chain;
118ed7: 8b 53 78 mov 0x78(%ebx),%edx
if ( _Chain_Is_empty( insert_chain ) ) {
118eda: 8b 55 b4 mov -0x4c(%ebp),%edx
118edd: 39 55 dc cmp %edx,-0x24(%ebp)
118ee0: 0f 84 86 00 00 00 je 118f6c <_Timer_server_Body+0x16c><== ALWAYS TAKEN
118ee6: b2 01 mov $0x1,%dl <== NOT EXECUTED
ts->insert_chain = NULL;
do_loop = false;
}
_ISR_Enable( level );
118ee8: 50 push %eax
118ee9: 9d popf
* 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;
while ( do_loop ) {
118eea: 84 d2 test %dl,%dl
118eec: 0f 85 66 ff ff ff jne 118e58 <_Timer_server_Body+0x58><== NEVER TAKEN
_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 ) ) {
118ef2: 8b 4d b0 mov -0x50(%ebp),%ecx
118ef5: 39 4d d0 cmp %ecx,-0x30(%ebp)
118ef8: 75 22 jne 118f1c <_Timer_server_Body+0x11c>
118efa: eb 7e jmp 118f7a <_Timer_server_Body+0x17a>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
118efc: 8b 10 mov (%eax),%edx
head->next = new_first;
118efe: 89 55 d0 mov %edx,-0x30(%ebp)
new_first->previous = head;
118f01: 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;
118f04: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
_ISR_Enable( level );
118f0b: 51 push %ecx
118f0c: 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 );
118f0d: 83 ec 08 sub $0x8,%esp
118f10: ff 70 24 pushl 0x24(%eax)
118f13: ff 70 20 pushl 0x20(%eax)
118f16: ff 50 1c call *0x1c(%eax)
}
118f19: 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 );
118f1c: 9c pushf
118f1d: fa cli
118f1e: 59 pop %ecx
initialized = false;
}
#endif
return status;
}
118f1f: 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))
118f22: 3b 45 b0 cmp -0x50(%ebp),%eax
118f25: 75 d5 jne 118efc <_Timer_server_Body+0xfc>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
118f27: 51 push %ecx
118f28: 9d popf
118f29: e9 22 ff ff ff jmp 118e50 <_Timer_server_Body+0x50>
118f2e: 66 90 xchg %ax,%ax
/*
* 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 );
118f30: 51 push %ecx
118f31: 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;
118f32: 89 c1 mov %eax,%ecx
118f34: 29 d1 sub %edx,%ecx
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
118f36: 51 push %ecx
118f37: ff 75 c4 pushl -0x3c(%ebp)
118f3a: 89 45 b8 mov %eax,-0x48(%ebp)
118f3d: e8 f2 3e 00 00 call 11ce34 <_Watchdog_Adjust_to_chain>
118f42: 83 c4 10 add $0x10,%esp
118f45: 8b 45 b8 mov -0x48(%ebp),%eax
118f48: e9 3a ff ff ff jmp 118e87 <_Timer_server_Body+0x87>
118f4d: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
118f50: 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;
118f51: 29 c2 sub %eax,%edx
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
118f53: 52 push %edx
118f54: 6a 01 push $0x1
118f56: ff 75 c4 pushl -0x3c(%ebp)
118f59: 89 45 b8 mov %eax,-0x48(%ebp)
118f5c: e8 5b 3e 00 00 call 11cdbc <_Watchdog_Adjust>
118f61: 83 c4 10 add $0x10,%esp
118f64: 8b 45 b8 mov -0x48(%ebp),%eax
118f67: e9 1b ff ff ff jmp 118e87 <_Timer_server_Body+0x87>
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
tmp = ts->insert_chain;
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
118f6c: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx)
do_loop = false;
118f73: 31 d2 xor %edx,%edx
118f75: e9 6e ff ff ff jmp 118ee8 <_Timer_server_Body+0xe8>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
118f7a: c6 43 7c 00 movb $0x0,0x7c(%ebx)
118f7e: a1 f0 2a 14 00 mov 0x142af0,%eax
118f83: 40 inc %eax
118f84: a3 f0 2a 14 00 mov %eax,0x142af0
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
118f89: 83 ec 08 sub $0x8,%esp
118f8c: 6a 08 push $0x8
118f8e: ff 33 pushl (%ebx)
118f90: e8 0f 38 00 00 call 11c7a4 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
118f95: 89 d8 mov %ebx,%eax
118f97: e8 c4 fd ff ff call 118d60 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
118f9c: 89 d8 mov %ebx,%eax
118f9e: e8 0d fe ff ff call 118db0 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
118fa3: e8 18 2f 00 00 call 11bec0 <_Thread_Enable_dispatch>
ts->active = true;
118fa8: 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 );
118fac: 5a pop %edx
118fad: ff 75 bc pushl -0x44(%ebp)
118fb0: e8 4b 40 00 00 call 11d000 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
118fb5: 58 pop %eax
118fb6: ff 75 c0 pushl -0x40(%ebp)
118fb9: e8 42 40 00 00 call 11d000 <_Watchdog_Remove>
118fbe: 83 c4 10 add $0x10,%esp
118fc1: e9 8a fe ff ff jmp 118e50 <_Timer_server_Body+0x50>
00118fc8 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
118fc8: 55 push %ebp
118fc9: 89 e5 mov %esp,%ebp
118fcb: 57 push %edi
118fcc: 56 push %esi
118fcd: 53 push %ebx
118fce: 83 ec 2c sub $0x2c,%esp
118fd1: 8b 5d 08 mov 0x8(%ebp),%ebx
118fd4: 8b 45 0c mov 0xc(%ebp),%eax
if ( ts->insert_chain == NULL ) {
118fd7: 8b 53 78 mov 0x78(%ebx),%edx
118fda: 85 d2 test %edx,%edx
118fdc: 74 16 je 118ff4 <_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 );
118fde: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED
118fe1: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED
118fe4: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED
}
}
118fe7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
118fea: 5b pop %ebx <== NOT EXECUTED
118feb: 5e pop %esi <== NOT EXECUTED
118fec: 5f pop %edi <== NOT EXECUTED
118fed: 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 );
118fee: e9 75 08 00 00 jmp 119868 <_Chain_Append> <== NOT EXECUTED
118ff3: 90 nop <== NOT EXECUTED
118ff4: 8b 15 f0 2a 14 00 mov 0x142af0,%edx
118ffa: 42 inc %edx
118ffb: 89 15 f0 2a 14 00 mov %edx,0x142af0
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
119001: 8b 50 38 mov 0x38(%eax),%edx
119004: 83 fa 01 cmp $0x1,%edx
119007: 74 7b je 119084 <_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 ) {
119009: 83 fa 03 cmp $0x3,%edx
11900c: 74 0e je 11901c <_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 );
}
}
11900e: 8d 65 f4 lea -0xc(%ebp),%esp
119011: 5b pop %ebx
119012: 5e pop %esi
119013: 5f pop %edi
119014: c9 leave
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
119015: e9 a6 2e 00 00 jmp 11bec0 <_Thread_Enable_dispatch>
11901a: 66 90 xchg %ax,%ax
} 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 );
11901c: 9c pushf
11901d: fa cli
11901e: 8f 45 e4 popl -0x1c(%ebp)
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
119021: 8b 0d 88 2b 14 00 mov 0x142b88,%ecx
last_snapshot = ts->TOD_watchdogs.last_snapshot;
119027: 8b 53 74 mov 0x74(%ebx),%edx
11902a: 89 55 d4 mov %edx,-0x2c(%ebp)
initialized = false;
}
#endif
return status;
}
11902d: 8b 53 68 mov 0x68(%ebx),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
119030: 8d 7b 6c lea 0x6c(%ebx),%edi
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
119033: 39 fa cmp %edi,%edx
119035: 74 21 je 119058 <_Timer_server_Schedule_operation_method+0x90>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
119037: 8b 7a 10 mov 0x10(%edx),%edi
if ( snapshot > last_snapshot ) {
11903a: 3b 4d d4 cmp -0x2c(%ebp),%ecx
11903d: 0f 86 a1 00 00 00 jbe 1190e4 <_Timer_server_Schedule_operation_method+0x11c>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
119043: 89 ce mov %ecx,%esi
119045: 2b 75 d4 sub -0x2c(%ebp),%esi
119048: 89 75 d4 mov %esi,-0x2c(%ebp)
if (delta_interval > delta) {
11904b: 39 f7 cmp %esi,%edi
11904d: 0f 86 9b 00 00 00 jbe 1190ee <_Timer_server_Schedule_operation_method+0x126><== NEVER TAKEN
delta_interval -= delta;
119053: 29 f7 sub %esi,%edi
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
119055: 89 7a 10 mov %edi,0x10(%edx)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
119058: 89 4b 74 mov %ecx,0x74(%ebx)
_ISR_Enable( level );
11905b: ff 75 e4 pushl -0x1c(%ebp)
11905e: 9d popf
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
11905f: 83 ec 08 sub $0x8,%esp
119062: 83 c0 10 add $0x10,%eax
119065: 50 push %eax
119066: 8d 43 68 lea 0x68(%ebx),%eax
119069: 50 push %eax
11906a: e8 51 3e 00 00 call 11cec0 <_Watchdog_Insert>
if ( !ts->active ) {
11906f: 8a 43 7c mov 0x7c(%ebx),%al
119072: 83 c4 10 add $0x10,%esp
119075: 84 c0 test %al,%al
119077: 75 95 jne 11900e <_Timer_server_Schedule_operation_method+0x46>
_Timer_server_Reset_tod_system_watchdog( ts );
119079: 89 d8 mov %ebx,%eax
11907b: e8 30 fd ff ff call 118db0 <_Timer_server_Reset_tod_system_watchdog>
119080: eb 8c jmp 11900e <_Timer_server_Schedule_operation_method+0x46>
119082: 66 90 xchg %ax,%ax
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 );
119084: 9c pushf
119085: fa cli
119086: 8f 45 e4 popl -0x1c(%ebp)
snapshot = _Watchdog_Ticks_since_boot;
119089: 8b 0d 24 2c 14 00 mov 0x142c24,%ecx
last_snapshot = ts->Interval_watchdogs.last_snapshot;
11908f: 8b 7b 3c mov 0x3c(%ebx),%edi
initialized = false;
}
#endif
return status;
}
119092: 8b 53 30 mov 0x30(%ebx),%edx
119095: 8d 73 34 lea 0x34(%ebx),%esi
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
last_snapshot = ts->Interval_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
119098: 39 f2 cmp %esi,%edx
11909a: 74 10 je 1190ac <_Timer_server_Schedule_operation_method+0xe4>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
11909c: 89 ce mov %ecx,%esi
11909e: 29 fe sub %edi,%esi
delta_interval = first_watchdog->delta_interval;
1190a0: 8b 7a 10 mov 0x10(%edx),%edi
if (delta_interval > delta) {
1190a3: 39 fe cmp %edi,%esi
1190a5: 73 39 jae 1190e0 <_Timer_server_Schedule_operation_method+0x118>
delta_interval -= delta;
1190a7: 29 f7 sub %esi,%edi
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
1190a9: 89 7a 10 mov %edi,0x10(%edx)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
1190ac: 89 4b 3c mov %ecx,0x3c(%ebx)
_ISR_Enable( level );
1190af: ff 75 e4 pushl -0x1c(%ebp)
1190b2: 9d popf
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
1190b3: 83 ec 08 sub $0x8,%esp
1190b6: 83 c0 10 add $0x10,%eax
1190b9: 50 push %eax
1190ba: 8d 43 30 lea 0x30(%ebx),%eax
1190bd: 50 push %eax
1190be: e8 fd 3d 00 00 call 11cec0 <_Watchdog_Insert>
if ( !ts->active ) {
1190c3: 8a 43 7c mov 0x7c(%ebx),%al
1190c6: 83 c4 10 add $0x10,%esp
1190c9: 84 c0 test %al,%al
1190cb: 0f 85 3d ff ff ff jne 11900e <_Timer_server_Schedule_operation_method+0x46>
_Timer_server_Reset_interval_system_watchdog( ts );
1190d1: 89 d8 mov %ebx,%eax
1190d3: e8 88 fc ff ff call 118d60 <_Timer_server_Reset_interval_system_watchdog>
1190d8: e9 31 ff ff ff jmp 11900e <_Timer_server_Schedule_operation_method+0x46>
1190dd: 8d 76 00 lea 0x0(%esi),%esi
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
1190e0: 31 ff xor %edi,%edi
1190e2: eb c5 jmp 1190a9 <_Timer_server_Schedule_operation_method+0xe1>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
1190e4: 03 7d d4 add -0x2c(%ebp),%edi
delta_interval += delta;
1190e7: 29 cf sub %ecx,%edi
1190e9: e9 67 ff ff ff jmp 119055 <_Timer_server_Schedule_operation_method+0x8d>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
1190ee: 31 ff xor %edi,%edi <== NOT EXECUTED
1190f0: e9 60 ff ff ff jmp 119055 <_Timer_server_Schedule_operation_method+0x8d><== NOT EXECUTED
0010fca8 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
10fca8: 55 push %ebp
10fca9: 89 e5 mov %esp,%ebp
10fcab: 57 push %edi
10fcac: 56 push %esi
10fcad: 53 push %ebx
10fcae: 83 ec 2c sub $0x2c,%esp
10fcb1: 8b 45 08 mov 0x8(%ebp),%eax
10fcb4: 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;
10fcb7: 8b 38 mov (%eax),%edi
left += lhs->tv_nsec;
10fcb9: 8b 70 04 mov 0x4(%eax),%esi
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
10fcbc: bb 00 ca 9a 3b mov $0x3b9aca00,%ebx
10fcc1: 8b 01 mov (%ecx),%eax
10fcc3: f7 eb imul %ebx
10fcc5: 89 45 e0 mov %eax,-0x20(%ebp)
10fcc8: 89 55 e4 mov %edx,-0x1c(%ebp)
right += rhs->tv_nsec;
10fccb: 8b 41 04 mov 0x4(%ecx),%eax
10fcce: 99 cltd
10fccf: 01 45 e0 add %eax,-0x20(%ebp)
10fcd2: 11 55 e4 adc %edx,-0x1c(%ebp)
if ( right == 0 ) {
10fcd5: 8b 55 e4 mov -0x1c(%ebp),%edx
10fcd8: 0b 55 e0 or -0x20(%ebp),%edx
10fcdb: 74 73 je 10fd50 <_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;
10fcdd: 89 f8 mov %edi,%eax
10fcdf: f7 eb imul %ebx
10fce1: 89 45 d0 mov %eax,-0x30(%ebp)
10fce4: 89 55 d4 mov %edx,-0x2c(%ebp)
left += lhs->tv_nsec;
10fce7: 89 f7 mov %esi,%edi
10fce9: c1 ff 1f sar $0x1f,%edi
10fcec: 01 75 d0 add %esi,-0x30(%ebp)
10fcef: 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;
10fcf2: 69 4d d4 a0 86 01 00 imul $0x186a0,-0x2c(%ebp),%ecx
10fcf9: bb a0 86 01 00 mov $0x186a0,%ebx
10fcfe: 8b 45 d0 mov -0x30(%ebp),%eax
10fd01: f7 e3 mul %ebx
10fd03: 8d 34 11 lea (%ecx,%edx,1),%esi
10fd06: ff 75 e4 pushl -0x1c(%ebp)
10fd09: ff 75 e0 pushl -0x20(%ebp)
10fd0c: 56 push %esi
10fd0d: 50 push %eax
10fd0e: e8 39 12 01 00 call 120f4c <__udivdi3>
10fd13: 83 c4 10 add $0x10,%esp
10fd16: 89 c3 mov %eax,%ebx
10fd18: 89 d6 mov %edx,%esi
*ival_percentage = answer / 1000;
10fd1a: 6a 00 push $0x0
10fd1c: 68 e8 03 00 00 push $0x3e8
10fd21: 52 push %edx
10fd22: 50 push %eax
10fd23: e8 24 12 01 00 call 120f4c <__udivdi3>
10fd28: 83 c4 10 add $0x10,%esp
10fd2b: 8b 55 10 mov 0x10(%ebp),%edx
10fd2e: 89 02 mov %eax,(%edx)
*fval_percentage = answer % 1000;
10fd30: 6a 00 push $0x0
10fd32: 68 e8 03 00 00 push $0x3e8
10fd37: 56 push %esi
10fd38: 53 push %ebx
10fd39: e8 1e 13 01 00 call 12105c <__umoddi3>
10fd3e: 83 c4 10 add $0x10,%esp
10fd41: 8b 55 14 mov 0x14(%ebp),%edx
10fd44: 89 02 mov %eax,(%edx)
}
10fd46: 8d 65 f4 lea -0xc(%ebp),%esp
10fd49: 5b pop %ebx
10fd4a: 5e pop %esi
10fd4b: 5f pop %edi
10fd4c: c9 leave
10fd4d: c3 ret
10fd4e: 66 90 xchg %ax,%ax
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
*ival_percentage = 0;
10fd50: 8b 45 10 mov 0x10(%ebp),%eax
10fd53: c7 00 00 00 00 00 movl $0x0,(%eax)
*fval_percentage = 0;
10fd59: 8b 55 14 mov 0x14(%ebp),%edx
10fd5c: c7 02 00 00 00 00 movl $0x0,(%edx)
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
*fval_percentage = answer % 1000;
}
10fd62: 8d 65 f4 lea -0xc(%ebp),%esp
10fd65: 5b pop %ebx
10fd66: 5e pop %esi
10fd67: 5f pop %edi
10fd68: c9 leave
10fd69: c3 ret
00120018 <_Timespec_Is_valid>:
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
const struct timespec *time
)
{
120018: 55 push %ebp
120019: 89 e5 mov %esp,%ebp
12001b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !time )
12001e: 85 c0 test %eax,%eax
120020: 74 1a je 12003c <_Timespec_Is_valid+0x24>
return false;
if ( time->tv_sec < 0 )
120022: 8b 10 mov (%eax),%edx
120024: 85 d2 test %edx,%edx
120026: 78 14 js 12003c <_Timespec_Is_valid+0x24>
return false;
if ( time->tv_nsec < 0 )
120028: 8b 40 04 mov 0x4(%eax),%eax
12002b: 85 c0 test %eax,%eax
12002d: 78 0d js 12003c <_Timespec_Is_valid+0x24>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
12002f: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
120034: 0f 96 c0 setbe %al
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
120037: c9 leave
120038: c3 ret
120039: 8d 76 00 lea 0x0(%esi),%esi
if ( time->tv_sec < 0 )
return false;
if ( time->tv_nsec < 0 )
return false;
12003c: 31 c0 xor %eax,%eax
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
12003e: c9 leave
12003f: c3 ret
0011198c <_Timespec_To_ticks>:
*/
uint32_t _Timespec_To_ticks(
const struct timespec *time
)
{
11198c: 55 push %ebp
11198d: 89 e5 mov %esp,%ebp
11198f: 56 push %esi
111990: 53 push %ebx
111991: 8b 5d 08 mov 0x8(%ebp),%ebx
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
111994: 8b 33 mov (%ebx),%esi
111996: 85 f6 test %esi,%esi
111998: 75 07 jne 1119a1 <_Timespec_To_ticks+0x15>
11199a: 8b 43 04 mov 0x4(%ebx),%eax
11199d: 85 c0 test %eax,%eax
11199f: 74 37 je 1119d8 <_Timespec_To_ticks+0x4c>
return 0;
ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
1119a1: e8 62 17 00 00 call 113108 <TOD_TICKS_PER_SECOND_method>
1119a6: 89 c1 mov %eax,%ecx
1119a8: 0f af ce imul %esi,%ecx
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
1119ab: a1 4c 3b 12 00 mov 0x123b4c,%eax
1119b0: 8d 04 80 lea (%eax,%eax,4),%eax
1119b3: 8d 04 80 lea (%eax,%eax,4),%eax
1119b6: 8d 34 80 lea (%eax,%eax,4),%esi
1119b9: c1 e6 03 shl $0x3,%esi
1119bc: 8b 43 04 mov 0x4(%ebx),%eax
1119bf: 31 d2 xor %edx,%edx
1119c1: f7 f6 div %esi
if (ticks)
1119c3: 01 c8 add %ecx,%eax
1119c5: 74 05 je 1119cc <_Timespec_To_ticks+0x40>
return ticks;
return 1;
}
1119c7: 5b pop %ebx
1119c8: 5e pop %esi
1119c9: c9 leave
1119ca: c3 ret
1119cb: 90 nop
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
if (ticks)
return ticks;
return 1;
1119cc: b8 01 00 00 00 mov $0x1,%eax
}
1119d1: 5b pop %ebx
1119d2: 5e pop %esi
1119d3: c9 leave
1119d4: c3 ret
1119d5: 8d 76 00 lea 0x0(%esi),%esi
)
{
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
return 0;
1119d8: 31 c0 xor %eax,%eax
if (ticks)
return ticks;
return 1;
}
1119da: 5b pop %ebx
1119db: 5e pop %esi
1119dc: c9 leave
1119dd: c3 ret
0010e618 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
10e618: 55 push %ebp
10e619: 89 e5 mov %esp,%ebp
10e61b: 57 push %edi
10e61c: 56 push %esi
10e61d: 53 push %ebx
10e61e: 83 ec 1c sub $0x1c,%esp
10e621: 8b 75 08 mov 0x8(%ebp),%esi
10e624: 8b 7d 10 mov 0x10(%ebp),%edi
10e627: 8a 45 0c mov 0xc(%ebp),%al
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e62a: 8b 1d 74 80 12 00 mov 0x128074,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e630: 81 fb 6c 80 12 00 cmp $0x12806c,%ebx
10e636: 74 25 je 10e65d <_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 );
10e638: 0f b6 c0 movzbl %al,%eax
10e63b: 89 45 e4 mov %eax,-0x1c(%ebp)
10e63e: 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 )
10e640: 8b 43 30 mov 0x30(%ebx),%eax
10e643: 85 c0 test %eax,%eax
10e645: 74 0b je 10e652 <_User_extensions_Fatal+0x3a>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
10e647: 52 push %edx
10e648: 57 push %edi
10e649: ff 75 e4 pushl -0x1c(%ebp)
10e64c: 56 push %esi
10e64d: ff d0 call *%eax
10e64f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e652: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e655: 81 fb 6c 80 12 00 cmp $0x12806c,%ebx
10e65b: 75 e3 jne 10e640 <_User_extensions_Fatal+0x28><== ALWAYS TAKEN
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e65d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10e660: 5b pop %ebx <== NOT EXECUTED
10e661: 5e pop %esi <== NOT EXECUTED
10e662: 5f pop %edi <== NOT EXECUTED
10e663: c9 leave <== NOT EXECUTED
10e664: c3 ret <== NOT EXECUTED
0010e4dc <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
10e4dc: 55 push %ebp
10e4dd: 89 e5 mov %esp,%ebp
10e4df: 57 push %edi
10e4e0: 56 push %esi
10e4e1: 53 push %ebx
10e4e2: 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;
10e4e5: a1 78 3b 12 00 mov 0x123b78,%eax
10e4ea: 89 45 dc mov %eax,-0x24(%ebp)
initial_extensions = Configuration.User_extension_table;
10e4ed: 8b 35 7c 3b 12 00 mov 0x123b7c,%esi
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10e4f3: c7 05 6c 80 12 00 70 movl $0x128070,0x12806c
10e4fa: 80 12 00
head->previous = NULL;
10e4fd: c7 05 70 80 12 00 00 movl $0x0,0x128070
10e504: 00 00 00
tail->previous = head;
10e507: c7 05 74 80 12 00 6c movl $0x12806c,0x128074
10e50e: 80 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10e511: c7 05 54 7e 12 00 58 movl $0x127e58,0x127e54
10e518: 7e 12 00
head->previous = NULL;
10e51b: c7 05 58 7e 12 00 00 movl $0x0,0x127e58
10e522: 00 00 00
tail->previous = head;
10e525: c7 05 5c 7e 12 00 54 movl $0x127e54,0x127e5c
10e52c: 7e 12 00
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
10e52f: 85 f6 test %esi,%esi
10e531: 74 64 je 10e597 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
10e533: 89 c2 mov %eax,%edx
10e535: 8d 04 40 lea (%eax,%eax,2),%eax
10e538: 8d 0c 82 lea (%edx,%eax,4),%ecx
10e53b: c1 e1 02 shl $0x2,%ecx
10e53e: 83 ec 0c sub $0xc,%esp
10e541: 51 push %ecx
10e542: 89 4d d8 mov %ecx,-0x28(%ebp)
10e545: e8 ce 04 00 00 call 10ea18 <_Workspace_Allocate_or_fatal_error>
10e54a: 89 c3 mov %eax,%ebx
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
10e54c: 31 c0 xor %eax,%eax
10e54e: 8b 4d d8 mov -0x28(%ebp),%ecx
10e551: 89 df mov %ebx,%edi
10e553: f3 aa rep stos %al,%es:(%edi)
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e555: 83 c4 10 add $0x10,%esp
10e558: 8b 45 dc mov -0x24(%ebp),%eax
10e55b: 85 c0 test %eax,%eax
10e55d: 74 38 je 10e597 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN
10e55f: 89 75 e4 mov %esi,-0x1c(%ebp)
10e562: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
10e569: 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;
10e56c: 8d 7b 14 lea 0x14(%ebx),%edi
10e56f: 8b 75 e4 mov -0x1c(%ebp),%esi
10e572: b9 08 00 00 00 mov $0x8,%ecx
10e577: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_User_extensions_Add_set( extension );
10e579: 83 ec 0c sub $0xc,%esp
10e57c: 53 push %ebx
10e57d: e8 5e 34 00 00 call 1119e0 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
10e582: 83 c3 34 add $0x34,%ebx
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
10e585: ff 45 e0 incl -0x20(%ebp)
10e588: 83 45 e4 20 addl $0x20,-0x1c(%ebp)
10e58c: 83 c4 10 add $0x10,%esp
10e58f: 8b 45 e0 mov -0x20(%ebp),%eax
10e592: 39 45 dc cmp %eax,-0x24(%ebp)
10e595: 77 d5 ja 10e56c <_User_extensions_Handler_initialization+0x90>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
10e597: 8d 65 f4 lea -0xc(%ebp),%esp
10e59a: 5b pop %ebx
10e59b: 5e pop %esi
10e59c: 5f pop %edi
10e59d: c9 leave
10e59e: c3 ret
0010fa5c <_User_extensions_Remove_set>:
#include <rtems/score/userext.h>
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
10fa5c: 55 push %ebp
10fa5d: 89 e5 mov %esp,%ebp
10fa5f: 53 push %ebx
10fa60: 83 ec 10 sub $0x10,%esp
10fa63: 8b 5d 08 mov 0x8(%ebp),%ebx
_Chain_Extract( &the_extension->Node );
10fa66: 53 push %ebx
10fa67: e8 74 d9 ff ff call 10d3e0 <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
10fa6c: 83 c4 10 add $0x10,%esp
10fa6f: 8b 43 24 mov 0x24(%ebx),%eax
10fa72: 85 c0 test %eax,%eax
10fa74: 74 12 je 10fa88 <_User_extensions_Remove_set+0x2c>
_Chain_Extract( &the_extension->Switch.Node );
10fa76: 83 c3 08 add $0x8,%ebx
10fa79: 89 5d 08 mov %ebx,0x8(%ebp)
}
10fa7c: 8b 5d fc mov -0x4(%ebp),%ebx
10fa7f: c9 leave
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
10fa80: e9 5b d9 ff ff jmp 10d3e0 <_Chain_Extract>
10fa85: 8d 76 00 lea 0x0(%esi),%esi
}
10fa88: 8b 5d fc mov -0x4(%ebp),%ebx
10fa8b: c9 leave
10fa8c: c3 ret
0010e5a0 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
10e5a0: 55 push %ebp
10e5a1: 89 e5 mov %esp,%ebp
10e5a3: 56 push %esi
10e5a4: 53 push %ebx
10e5a5: 8b 75 08 mov 0x8(%ebp),%esi
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e5a8: 8b 1d 6c 80 12 00 mov 0x12806c,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e5ae: 81 fb 70 80 12 00 cmp $0x128070,%ebx
10e5b4: 74 1c je 10e5d2 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
10e5b6: 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 )
10e5b8: 8b 43 28 mov 0x28(%ebx),%eax
10e5bb: 85 c0 test %eax,%eax
10e5bd: 74 09 je 10e5c8 <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
10e5bf: 83 ec 0c sub $0xc,%esp
10e5c2: 56 push %esi
10e5c3: ff d0 call *%eax
10e5c5: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e5c8: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e5ca: 81 fb 70 80 12 00 cmp $0x128070,%ebx
10e5d0: 75 e6 jne 10e5b8 <_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 );
}
}
10e5d2: 8d 65 f8 lea -0x8(%ebp),%esp
10e5d5: 5b pop %ebx
10e5d6: 5e pop %esi
10e5d7: c9 leave
10e5d8: c3 ret
0010e668 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
10e668: 55 push %ebp
10e669: 89 e5 mov %esp,%ebp
10e66b: 56 push %esi
10e66c: 53 push %ebx
10e66d: 8b 75 08 mov 0x8(%ebp),%esi
return false;
}
}
return true;
}
10e670: 8b 1d 6c 80 12 00 mov 0x12806c,%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
10e676: 81 fb 70 80 12 00 cmp $0x128070,%ebx
10e67c: 74 26 je 10e6a4 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
10e67e: 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 ) {
10e680: 8b 43 14 mov 0x14(%ebx),%eax
10e683: 85 c0 test %eax,%eax
10e685: 74 13 je 10e69a <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
10e687: 83 ec 08 sub $0x8,%esp
10e68a: 56 push %esi
10e68b: ff 35 f8 83 12 00 pushl 0x1283f8
10e691: ff d0 call *%eax
_Thread_Executing,
the_thread
);
if ( !status )
10e693: 83 c4 10 add $0x10,%esp
10e696: 84 c0 test %al,%al
10e698: 74 16 je 10e6b0 <_User_extensions_Thread_create+0x48>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e69a: 8b 1b mov (%ebx),%ebx
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
10e69c: 81 fb 70 80 12 00 cmp $0x128070,%ebx
10e6a2: 75 dc jne 10e680 <_User_extensions_Thread_create+0x18>
if ( !status )
return false;
}
}
return true;
10e6a4: b0 01 mov $0x1,%al
}
10e6a6: 8d 65 f8 lea -0x8(%ebp),%esp
10e6a9: 5b pop %ebx
10e6aa: 5e pop %esi
10e6ab: c9 leave
10e6ac: c3 ret
10e6ad: 8d 76 00 lea 0x0(%esi),%esi
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
return false;
10e6b0: 31 c0 xor %eax,%eax
}
}
return true;
}
10e6b2: 8d 65 f8 lea -0x8(%ebp),%esp
10e6b5: 5b pop %ebx
10e6b6: 5e pop %esi
10e6b7: c9 leave
10e6b8: c3 ret
0010e6bc <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
10e6bc: 55 push %ebp
10e6bd: 89 e5 mov %esp,%ebp
10e6bf: 56 push %esi
10e6c0: 53 push %ebx
10e6c1: 8b 75 08 mov 0x8(%ebp),%esi
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10e6c4: 8b 1d 74 80 12 00 mov 0x128074,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e6ca: 81 fb 6c 80 12 00 cmp $0x12806c,%ebx
10e6d0: 74 23 je 10e6f5 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN
10e6d2: 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 )
10e6d4: 8b 43 20 mov 0x20(%ebx),%eax
10e6d7: 85 c0 test %eax,%eax
10e6d9: 74 0f je 10e6ea <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
10e6db: 83 ec 08 sub $0x8,%esp
10e6de: 56 push %esi
10e6df: ff 35 f8 83 12 00 pushl 0x1283f8
10e6e5: ff d0 call *%eax
10e6e7: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e6ea: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e6ed: 81 fb 6c 80 12 00 cmp $0x12806c,%ebx
10e6f3: 75 df jne 10e6d4 <_User_extensions_Thread_delete+0x18>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
10e6f5: 8d 65 f8 lea -0x8(%ebp),%esp
10e6f8: 5b pop %ebx
10e6f9: 5e pop %esi
10e6fa: c9 leave
10e6fb: c3 ret
0010e5dc <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
10e5dc: 55 push %ebp
10e5dd: 89 e5 mov %esp,%ebp
10e5df: 56 push %esi
10e5e0: 53 push %ebx
10e5e1: 8b 75 08 mov 0x8(%ebp),%esi
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
10e5e4: 8b 1d 74 80 12 00 mov 0x128074,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e5ea: 81 fb 6c 80 12 00 cmp $0x12806c,%ebx
10e5f0: 74 1d je 10e60f <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN
10e5f2: 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 )
10e5f4: 8b 43 2c mov 0x2c(%ebx),%eax
10e5f7: 85 c0 test %eax,%eax
10e5f9: 74 09 je 10e604 <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
10e5fb: 83 ec 0c sub $0xc,%esp
10e5fe: 56 push %esi
10e5ff: ff d0 call *%eax
10e601: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
10e604: 8b 5b 04 mov 0x4(%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
10e607: 81 fb 6c 80 12 00 cmp $0x12806c,%ebx
10e60d: 75 e5 jne 10e5f4 <_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 );
}
}
10e60f: 8d 65 f8 lea -0x8(%ebp),%esp
10e612: 5b pop %ebx
10e613: 5e pop %esi
10e614: c9 leave
10e615: c3 ret
0010f2c0 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
10f2c0: 55 push %ebp
10f2c1: 89 e5 mov %esp,%ebp
10f2c3: 56 push %esi
10f2c4: 53 push %ebx
10f2c5: 8b 75 08 mov 0x8(%ebp),%esi
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10f2c8: 8b 1d 8c a3 12 00 mov 0x12a38c,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10f2ce: 81 fb 90 a3 12 00 cmp $0x12a390,%ebx
10f2d4: 74 22 je 10f2f8 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
10f2d6: 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 )
10f2d8: 8b 43 1c mov 0x1c(%ebx),%eax
10f2db: 85 c0 test %eax,%eax
10f2dd: 74 0f je 10f2ee <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
10f2df: 83 ec 08 sub $0x8,%esp
10f2e2: 56 push %esi
10f2e3: ff 35 18 a7 12 00 pushl 0x12a718
10f2e9: ff d0 call *%eax
10f2eb: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10f2ee: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10f2f0: 81 fb 90 a3 12 00 cmp $0x12a390,%ebx
10f2f6: 75 e0 jne 10f2d8 <_User_extensions_Thread_restart+0x18>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
10f2f8: 8d 65 f8 lea -0x8(%ebp),%esp
10f2fb: 5b pop %ebx
10f2fc: 5e pop %esi
10f2fd: c9 leave
10f2fe: c3 ret
0010e6fc <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
10e6fc: 55 push %ebp
10e6fd: 89 e5 mov %esp,%ebp
10e6ff: 56 push %esi
10e700: 53 push %ebx
10e701: 8b 75 08 mov 0x8(%ebp),%esi
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10e704: 8b 1d 6c 80 12 00 mov 0x12806c,%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e70a: 81 fb 70 80 12 00 cmp $0x128070,%ebx
10e710: 74 22 je 10e734 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
10e712: 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 )
10e714: 8b 43 18 mov 0x18(%ebx),%eax
10e717: 85 c0 test %eax,%eax
10e719: 74 0f je 10e72a <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
10e71b: 83 ec 08 sub $0x8,%esp
10e71e: 56 push %esi
10e71f: ff 35 f8 83 12 00 pushl 0x1283f8
10e725: ff d0 call *%eax
10e727: 83 c4 10 add $0x10,%esp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
10e72a: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
10e72c: 81 fb 70 80 12 00 cmp $0x128070,%ebx
10e732: 75 e0 jne 10e714 <_User_extensions_Thread_start+0x18>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
10e734: 8d 65 f8 lea -0x8(%ebp),%esp
10e737: 5b pop %ebx
10e738: 5e pop %esi
10e739: c9 leave
10e73a: c3 ret
0010e73c <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
10e73c: 55 push %ebp
10e73d: 89 e5 mov %esp,%ebp
10e73f: 57 push %edi
10e740: 56 push %esi
10e741: 53 push %ebx
10e742: 83 ec 0c sub $0xc,%esp
10e745: 8b 7d 08 mov 0x8(%ebp),%edi
10e748: 8b 75 0c mov 0xc(%ebp),%esi
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10e74b: 8b 1d 54 7e 12 00 mov 0x127e54,%ebx
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
10e751: 81 fb 58 7e 12 00 cmp $0x127e58,%ebx
10e757: 74 18 je 10e771 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN
10e759: 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 );
10e75c: 83 ec 08 sub $0x8,%esp
10e75f: 56 push %esi
10e760: 57 push %edi
10e761: ff 53 08 call *0x8(%ebx)
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
10e764: 8b 1b mov (%ebx),%ebx
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
10e766: 83 c4 10 add $0x10,%esp
10e769: 81 fb 58 7e 12 00 cmp $0x127e58,%ebx
10e76f: 75 eb jne 10e75c <_User_extensions_Thread_switch+0x20>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
10e771: 8d 65 f4 lea -0xc(%ebp),%esp
10e774: 5b pop %ebx
10e775: 5e pop %esi
10e776: 5f pop %edi
10e777: c9 leave
10e778: c3 ret
00110088 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
110088: 55 push %ebp
110089: 89 e5 mov %esp,%ebp
11008b: 57 push %edi
11008c: 56 push %esi
11008d: 53 push %ebx
11008e: 83 ec 1c sub $0x1c,%esp
110091: 8b 75 08 mov 0x8(%ebp),%esi
110094: 8b 4d 0c mov 0xc(%ebp),%ecx
110097: 8b 5d 10 mov 0x10(%ebp),%ebx
ISR_Level level;
_ISR_Disable( level );
11009a: 9c pushf
11009b: fa cli
11009c: 58 pop %eax
}
}
_ISR_Enable( level );
}
11009d: 8b 16 mov (%esi),%edx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
11009f: 8d 7e 04 lea 0x4(%esi),%edi
1100a2: 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 ) ) {
1100a5: 39 fa cmp %edi,%edx
1100a7: 74 3d je 1100e6 <_Watchdog_Adjust+0x5e>
switch ( direction ) {
1100a9: 85 c9 test %ecx,%ecx
1100ab: 75 43 jne 1100f0 <_Watchdog_Adjust+0x68>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
1100ad: 85 db test %ebx,%ebx
1100af: 74 35 je 1100e6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
1100b1: 8b 7a 10 mov 0x10(%edx),%edi
1100b4: 39 fb cmp %edi,%ebx
1100b6: 73 0f jae 1100c7 <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN
1100b8: eb 3e jmp 1100f8 <_Watchdog_Adjust+0x70> <== NOT EXECUTED
1100ba: 66 90 xchg %ax,%ax <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
1100bc: 29 fb sub %edi,%ebx
1100be: 74 26 je 1100e6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
1100c0: 8b 7a 10 mov 0x10(%edx),%edi
1100c3: 39 df cmp %ebx,%edi
1100c5: 77 31 ja 1100f8 <_Watchdog_Adjust+0x70>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
1100c7: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx)
_ISR_Enable( level );
1100ce: 50 push %eax
1100cf: 9d popf
_Watchdog_Tickle( header );
1100d0: 83 ec 0c sub $0xc,%esp
1100d3: 56 push %esi
1100d4: e8 d3 01 00 00 call 1102ac <_Watchdog_Tickle>
_ISR_Disable( level );
1100d9: 9c pushf
1100da: fa cli
1100db: 58 pop %eax
}
}
_ISR_Enable( level );
}
1100dc: 8b 16 mov (%esi),%edx
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
1100de: 83 c4 10 add $0x10,%esp
1100e1: 39 55 e4 cmp %edx,-0x1c(%ebp)
1100e4: 75 d6 jne 1100bc <_Watchdog_Adjust+0x34>
}
break;
}
}
_ISR_Enable( level );
1100e6: 50 push %eax
1100e7: 9d popf
}
1100e8: 8d 65 f4 lea -0xc(%ebp),%esp
1100eb: 5b pop %ebx
1100ec: 5e pop %esi
1100ed: 5f pop %edi
1100ee: c9 leave
1100ef: c3 ret
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
1100f0: 49 dec %ecx
1100f1: 75 f3 jne 1100e6 <_Watchdog_Adjust+0x5e> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
1100f3: 01 5a 10 add %ebx,0x10(%edx)
break;
1100f6: eb ee jmp 1100e6 <_Watchdog_Adjust+0x5e>
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
1100f8: 29 df sub %ebx,%edi
1100fa: 89 7a 10 mov %edi,0x10(%edx)
break;
1100fd: eb e7 jmp 1100e6 <_Watchdog_Adjust+0x5e>
0010e77c <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
10e77c: 55 push %ebp
10e77d: 89 e5 mov %esp,%ebp
10e77f: 57 push %edi
10e780: 56 push %esi
10e781: 53 push %ebx
10e782: 83 ec 04 sub $0x4,%esp
10e785: 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;
10e788: 8b 3d f4 83 12 00 mov 0x1283f4,%edi
_ISR_Disable( level );
10e78e: 9c pushf
10e78f: fa cli
10e790: 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 ) {
10e793: 8b 43 08 mov 0x8(%ebx),%eax
10e796: 85 c0 test %eax,%eax
10e798: 0f 85 9e 00 00 00 jne 10e83c <_Watchdog_Insert+0xc0>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
10e79e: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx)
_Watchdog_Sync_count++;
10e7a5: a1 80 7f 12 00 mov 0x127f80,%eax
10e7aa: 40 inc %eax
10e7ab: a3 80 7f 12 00 mov %eax,0x127f80
restart:
delta_interval = the_watchdog->initial;
10e7b0: 8b 43 0c mov 0xc(%ebx),%eax
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
10e7b3: 8b 4d 08 mov 0x8(%ebp),%ecx
10e7b6: 8b 11 mov (%ecx),%edx
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10e7b8: 85 c0 test %eax,%eax
10e7ba: 74 5d je 10e819 <_Watchdog_Insert+0x9d>
10e7bc: 8b 32 mov (%edx),%esi
10e7be: 85 f6 test %esi,%esi
10e7c0: 74 57 je 10e819 <_Watchdog_Insert+0x9d>
break;
if ( delta_interval < after->delta_interval ) {
10e7c2: 8b 4a 10 mov 0x10(%edx),%ecx
10e7c5: 39 c8 cmp %ecx,%eax
10e7c7: 73 22 jae 10e7eb <_Watchdog_Insert+0x6f>
10e7c9: eb 49 jmp 10e814 <_Watchdog_Insert+0x98>
10e7cb: 90 nop
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
10e7cc: 8b 35 04 7f 12 00 mov 0x127f04,%esi
10e7d2: 39 f7 cmp %esi,%edi
10e7d4: 72 72 jb 10e848 <_Watchdog_Insert+0xcc>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
10e7d6: 29 c8 sub %ecx,%eax
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
10e7d8: 8b 12 mov (%edx),%edx
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
10e7da: 85 c0 test %eax,%eax
10e7dc: 74 3b je 10e819 <_Watchdog_Insert+0x9d>
10e7de: 8b 0a mov (%edx),%ecx
10e7e0: 85 c9 test %ecx,%ecx
10e7e2: 74 35 je 10e819 <_Watchdog_Insert+0x9d>
break;
if ( delta_interval < after->delta_interval ) {
10e7e4: 8b 4a 10 mov 0x10(%edx),%ecx
10e7e7: 39 c1 cmp %eax,%ecx
10e7e9: 77 29 ja 10e814 <_Watchdog_Insert+0x98>
break;
}
delta_interval -= after->delta_interval;
_ISR_Flash( level );
10e7eb: ff 75 f0 pushl -0x10(%ebp)
10e7ee: 9d popf
10e7ef: fa cli
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
10e7f0: 83 7b 08 01 cmpl $0x1,0x8(%ebx)
10e7f4: 74 d6 je 10e7cc <_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;
10e7f6: 89 3d 04 7f 12 00 mov %edi,0x127f04
_Watchdog_Sync_count--;
10e7fc: a1 80 7f 12 00 mov 0x127f80,%eax
10e801: 48 dec %eax
10e802: a3 80 7f 12 00 mov %eax,0x127f80
_ISR_Enable( level );
10e807: ff 75 f0 pushl -0x10(%ebp)
10e80a: 9d popf
}
10e80b: 58 pop %eax
10e80c: 5b pop %ebx
10e80d: 5e pop %esi
10e80e: 5f pop %edi
10e80f: c9 leave
10e810: c3 ret
10e811: 8d 76 00 lea 0x0(%esi),%esi
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
10e814: 29 c1 sub %eax,%ecx
10e816: 89 4a 10 mov %ecx,0x10(%edx)
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
10e819: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
10e820: 89 43 10 mov %eax,0x10(%ebx)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
10e823: 8b 42 04 mov 0x4(%edx),%eax
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
10e826: 89 43 04 mov %eax,0x4(%ebx)
before_node = after_node->next;
10e829: 8b 10 mov (%eax),%edx
after_node->next = the_node;
10e82b: 89 18 mov %ebx,(%eax)
the_node->next = before_node;
10e82d: 89 13 mov %edx,(%ebx)
before_node->previous = the_node;
10e82f: 89 5a 04 mov %ebx,0x4(%edx)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
10e832: a1 84 7f 12 00 mov 0x127f84,%eax
10e837: 89 43 14 mov %eax,0x14(%ebx)
10e83a: eb ba jmp 10e7f6 <_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 );
10e83c: ff 75 f0 pushl -0x10(%ebp)
10e83f: 9d popf
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
10e840: 58 pop %eax
10e841: 5b pop %ebx
10e842: 5e pop %esi
10e843: 5f pop %edi
10e844: c9 leave
10e845: c3 ret
10e846: 66 90 xchg %ax,%ax
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;
10e848: 89 3d 04 7f 12 00 mov %edi,0x127f04
goto restart;
10e84e: e9 5d ff ff ff jmp 10e7b0 <_Watchdog_Insert+0x34>
0010e8bc <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
10e8bc: 55 push %ebp
10e8bd: 89 e5 mov %esp,%ebp
10e8bf: 56 push %esi
10e8c0: 53 push %ebx
10e8c1: 8b 55 08 mov 0x8(%ebp),%edx
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
10e8c4: 9c pushf
10e8c5: fa cli
10e8c6: 59 pop %ecx
previous_state = the_watchdog->state;
10e8c7: 8b 42 08 mov 0x8(%edx),%eax
switch ( previous_state ) {
10e8ca: 83 f8 01 cmp $0x1,%eax
10e8cd: 74 4d je 10e91c <_Watchdog_Remove+0x60>
10e8cf: 73 0f jae 10e8e0 <_Watchdog_Remove+0x24>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
10e8d1: 8b 1d 84 7f 12 00 mov 0x127f84,%ebx
10e8d7: 89 5a 18 mov %ebx,0x18(%edx)
_ISR_Enable( level );
10e8da: 51 push %ecx
10e8db: 9d popf
return( previous_state );
}
10e8dc: 5b pop %ebx
10e8dd: 5e pop %esi
10e8de: c9 leave
10e8df: c3 ret
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
10e8e0: 83 f8 03 cmp $0x3,%eax
10e8e3: 77 ec ja 10e8d1 <_Watchdog_Remove+0x15> <== NEVER TAKEN
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
10e8e5: 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 );
}
10e8ec: 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) )
10e8ee: 8b 33 mov (%ebx),%esi
10e8f0: 85 f6 test %esi,%esi
10e8f2: 74 06 je 10e8fa <_Watchdog_Remove+0x3e>
next_watchdog->delta_interval += the_watchdog->delta_interval;
10e8f4: 8b 72 10 mov 0x10(%edx),%esi
10e8f7: 01 73 10 add %esi,0x10(%ebx)
if ( _Watchdog_Sync_count )
10e8fa: 8b 35 80 7f 12 00 mov 0x127f80,%esi
10e900: 85 f6 test %esi,%esi
10e902: 74 0c je 10e910 <_Watchdog_Remove+0x54>
_Watchdog_Sync_level = _ISR_Nest_level;
10e904: 8b 35 f4 83 12 00 mov 0x1283f4,%esi
10e90a: 89 35 04 7f 12 00 mov %esi,0x127f04
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
10e910: 8b 72 04 mov 0x4(%edx),%esi
next->previous = previous;
10e913: 89 73 04 mov %esi,0x4(%ebx)
previous->next = next;
10e916: 89 1e mov %ebx,(%esi)
10e918: eb b7 jmp 10e8d1 <_Watchdog_Remove+0x15>
10e91a: 66 90 xchg %ax,%ax
/*
* 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;
10e91c: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx)
break;
10e923: eb ac jmp 10e8d1 <_Watchdog_Remove+0x15>
0010fc68 <_Watchdog_Report>:
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
10fc68: 55 push %ebp
10fc69: 89 e5 mov %esp,%ebp
10fc6b: 57 push %edi
10fc6c: 56 push %esi
10fc6d: 53 push %ebx
10fc6e: 83 ec 2c sub $0x2c,%esp
10fc71: 8b 55 08 mov 0x8(%ebp),%edx
10fc74: 8b 45 0c mov 0xc(%ebp),%eax
printk(
10fc77: 8b 78 24 mov 0x24(%eax),%edi
10fc7a: 8b 70 20 mov 0x20(%eax),%esi
10fc7d: 8b 58 1c mov 0x1c(%eax),%ebx
10fc80: 8b 48 0c mov 0xc(%eax),%ecx
10fc83: 89 4d d4 mov %ecx,-0x2c(%ebp)
10fc86: 8b 48 10 mov 0x10(%eax),%ecx
10fc89: 89 4d e4 mov %ecx,-0x1c(%ebp)
10fc8c: 85 d2 test %edx,%edx
10fc8e: 74 2c je 10fcbc <_Watchdog_Report+0x54>
10fc90: b9 43 35 12 00 mov $0x123543,%ecx
10fc95: 83 ec 0c sub $0xc,%esp
10fc98: 57 push %edi
10fc99: 56 push %esi
10fc9a: 53 push %ebx
10fc9b: 50 push %eax
10fc9c: ff 75 d4 pushl -0x2c(%ebp)
10fc9f: ff 75 e4 pushl -0x1c(%ebp)
10fca2: 51 push %ecx
10fca3: 52 push %edx
10fca4: 68 96 3f 12 00 push $0x123f96
10fca9: e8 32 9e ff ff call 109ae0 <printk>
10fcae: 83 c4 30 add $0x30,%esp
watch,
watch->routine,
watch->id,
watch->user_data
);
}
10fcb1: 8d 65 f4 lea -0xc(%ebp),%esp
10fcb4: 5b pop %ebx
10fcb5: 5e pop %esi
10fcb6: 5f pop %edi
10fcb7: c9 leave
10fcb8: c3 ret
10fcb9: 8d 76 00 lea 0x0(%esi),%esi
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
printk(
10fcbc: b9 09 3e 12 00 mov $0x123e09,%ecx
10fcc1: 89 ca mov %ecx,%edx
10fcc3: eb d0 jmp 10fc95 <_Watchdog_Report+0x2d>
0010fbf8 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
10fbf8: 55 push %ebp
10fbf9: 89 e5 mov %esp,%ebp
10fbfb: 57 push %edi
10fbfc: 56 push %esi
10fbfd: 53 push %ebx
10fbfe: 83 ec 20 sub $0x20,%esp
10fc01: 8b 7d 08 mov 0x8(%ebp),%edi
10fc04: 8b 75 0c mov 0xc(%ebp),%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
10fc07: 9c pushf
10fc08: fa cli
10fc09: 8f 45 e4 popl -0x1c(%ebp)
printk( "Watchdog Chain: %s %p\n", name, header );
10fc0c: 56 push %esi
10fc0d: 57 push %edi
10fc0e: 68 60 3f 12 00 push $0x123f60
10fc13: e8 c8 9e ff ff call 109ae0 <printk>
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
10fc18: 8b 1e mov (%esi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10fc1a: 83 c6 04 add $0x4,%esi
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
10fc1d: 83 c4 10 add $0x10,%esp
10fc20: 39 f3 cmp %esi,%ebx
10fc22: 74 31 je 10fc55 <_Watchdog_Report_chain+0x5d>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
10fc24: 83 ec 08 sub $0x8,%esp
10fc27: 53 push %ebx
10fc28: 6a 00 push $0x0
10fc2a: e8 39 00 00 00 call 10fc68 <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
10fc2f: 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 = _Chain_First( header ) ;
10fc31: 83 c4 10 add $0x10,%esp
10fc34: 39 f3 cmp %esi,%ebx
10fc36: 75 ec jne 10fc24 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
10fc38: 83 ec 08 sub $0x8,%esp
10fc3b: 57 push %edi
10fc3c: 68 77 3f 12 00 push $0x123f77
10fc41: e8 9a 9e ff ff call 109ae0 <printk>
10fc46: 83 c4 10 add $0x10,%esp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
10fc49: ff 75 e4 pushl -0x1c(%ebp)
10fc4c: 9d popf
}
10fc4d: 8d 65 f4 lea -0xc(%ebp),%esp
10fc50: 5b pop %ebx
10fc51: 5e pop %esi
10fc52: 5f pop %edi
10fc53: c9 leave
10fc54: c3 ret
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
10fc55: 83 ec 0c sub $0xc,%esp
10fc58: 68 86 3f 12 00 push $0x123f86
10fc5d: e8 7e 9e ff ff call 109ae0 <printk>
10fc62: 83 c4 10 add $0x10,%esp
10fc65: eb e2 jmp 10fc49 <_Watchdog_Report_chain+0x51>
0010e994 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
10e994: 55 push %ebp
10e995: 89 e5 mov %esp,%ebp
10e997: 57 push %edi
10e998: 53 push %ebx
uintptr_t memory_available = 0;
void *starting_address = Configuration.work_space_start;
10e999: 8b 1d 40 3b 12 00 mov 0x123b40,%ebx
uintptr_t size = Configuration.work_space_size;
10e99f: 8b 15 44 3b 12 00 mov 0x123b44,%edx
if ( Configuration.do_zero_of_workspace )
10e9a5: 80 3d 68 3b 12 00 00 cmpb $0x0,0x123b68
10e9ac: 75 1e jne 10e9cc <_Workspace_Handler_initialization+0x38>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
10e9ae: 6a 04 push $0x4
10e9b0: 52 push %edx
10e9b1: 53 push %ebx
10e9b2: 68 80 7e 12 00 push $0x127e80
10e9b7: e8 78 dd ff ff call 10c734 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
10e9bc: 83 c4 10 add $0x10,%esp
10e9bf: 85 c0 test %eax,%eax
10e9c1: 74 13 je 10e9d6 <_Workspace_Handler_initialization+0x42>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
10e9c3: 8d 65 f8 lea -0x8(%ebp),%esp
10e9c6: 5b pop %ebx
10e9c7: 5f pop %edi
10e9c8: c9 leave
10e9c9: c3 ret
10e9ca: 66 90 xchg %ax,%ax
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 );
10e9cc: 31 c0 xor %eax,%eax
10e9ce: 89 df mov %ebx,%edi
10e9d0: 89 d1 mov %edx,%ecx
10e9d2: f3 aa rep stos %al,%es:(%edi)
10e9d4: eb d8 jmp 10e9ae <_Workspace_Handler_initialization+0x1a>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
10e9d6: 50 push %eax
10e9d7: 6a 02 push $0x2
10e9d9: 6a 01 push $0x1
10e9db: 6a 00 push $0x0
10e9dd: e8 5a df ff ff call 10c93c <_Internal_error_Occurred>
0010c4f4 <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
10c4f4: 55 push %ebp
10c4f5: 89 e5 mov %esp,%ebp
10c4f7: 57 push %edi
10c4f8: 56 push %esi
10c4f9: 53 push %ebx
10c4fa: 83 ec 78 sub $0x78,%esp
10c4fd: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
10c500: 53 push %ebx
10c501: e8 2a ea ff ff call 10af30 <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
10c506: 83 c4 10 add $0x10,%esp
10c509: 85 c0 test %eax,%eax
10c50b: 0f 85 57 01 00 00 jne 10c668 <_rename_r+0x174>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
10c511: 52 push %edx
10c512: 8d 45 b8 lea -0x48(%ebp),%eax
10c515: 89 45 94 mov %eax,-0x6c(%ebp)
10c518: 50 push %eax
10c519: 8d 45 e4 lea -0x1c(%ebp),%eax
10c51c: 50 push %eax
10c51d: 53 push %ebx
10c51e: e8 e1 03 00 00 call 10c904 <rtems_filesystem_get_start_loc>
10c523: 83 c4 10 add $0x10,%esp
10c526: 31 d2 xor %edx,%edx
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;
10c528: c6 45 93 00 movb $0x0,-0x6d(%ebp)
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
10c52c: 8d 7d cc lea -0x34(%ebp),%edi
10c52f: b9 05 00 00 00 mov $0x5,%ecx
10c534: 8b 75 94 mov -0x6c(%ebp),%esi
10c537: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = old + old_parent_pathlen;
10c539: 01 d3 add %edx,%ebx
10c53b: 89 5d e0 mov %ebx,-0x20(%ebp)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
10c53e: be ff ff ff ff mov $0xffffffff,%esi
10c543: 89 f1 mov %esi,%ecx
10c545: 89 df mov %ebx,%edi
10c547: 31 c0 xor %eax,%eax
10c549: f2 ae repnz scas %es:(%edi),%al
10c54b: f7 d1 not %ecx
10c54d: 49 dec %ecx
10c54e: 83 ec 08 sub $0x8,%esp
10c551: 51 push %ecx
10c552: 53 push %ebx
10c553: e8 1c ea ff ff call 10af74 <rtems_filesystem_prefix_separators>
10c558: 01 c3 add %eax,%ebx
10c55a: 89 5d e0 mov %ebx,-0x20(%ebp)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
10c55d: 89 f1 mov %esi,%ecx
10c55f: 89 df mov %ebx,%edi
10c561: 31 c0 xor %eax,%eax
10c563: f2 ae repnz scas %es:(%edi),%al
10c565: f7 d1 not %ecx
10c567: 49 dec %ecx
10c568: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c56f: 8d 75 cc lea -0x34(%ebp),%esi
10c572: 56 push %esi
10c573: 6a 00 push $0x0
10c575: 51 push %ecx
10c576: 53 push %ebx
10c577: e8 08 e9 ff ff call 10ae84 <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
10c57c: 83 c4 20 add $0x20,%esp
10c57f: 85 c0 test %eax,%eax
10c581: 0f 85 c9 00 00 00 jne 10c650 <_rename_r+0x15c>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
10c587: 50 push %eax
10c588: 8d 5d a4 lea -0x5c(%ebp),%ebx
10c58b: 53 push %ebx
10c58c: 8d 45 e4 lea -0x1c(%ebp),%eax
10c58f: 50 push %eax
10c590: ff 75 10 pushl 0x10(%ebp)
10c593: e8 6c 03 00 00 call 10c904 <rtems_filesystem_get_start_loc>
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
10c598: 83 c4 0c add $0xc,%esp
10c59b: 8d 45 e0 lea -0x20(%ebp),%eax
10c59e: 50 push %eax
10c59f: 53 push %ebx
10c5a0: 8b 45 10 mov 0x10(%ebp),%eax
10c5a3: 03 45 e4 add -0x1c(%ebp),%eax
10c5a6: 50 push %eax
10c5a7: 8b 45 b0 mov -0x50(%ebp),%eax
10c5aa: ff 50 04 call *0x4(%eax)
if ( result != 0 ) {
10c5ad: 83 c4 10 add $0x10,%esp
10c5b0: 85 c0 test %eax,%eax
10c5b2: 0f 85 e0 00 00 00 jne 10c698 <_rename_r+0x1a4>
/*
* 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 ) {
10c5b8: 8b 45 b4 mov -0x4c(%ebp),%eax
10c5bb: 39 45 c8 cmp %eax,-0x38(%ebp)
10c5be: 75 48 jne 10c608 <_rename_r+0x114>
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 );
10c5c0: ff 75 e0 pushl -0x20(%ebp)
10c5c3: 53 push %ebx
10c5c4: 56 push %esi
10c5c5: ff 75 94 pushl -0x6c(%ebp)
10c5c8: 8b 45 b0 mov -0x50(%ebp),%eax
10c5cb: ff 50 40 call *0x40(%eax)
10c5ce: 89 c7 mov %eax,%edi
rtems_filesystem_freenode( &new_parent_loc );
10c5d0: 89 1c 24 mov %ebx,(%esp)
10c5d3: e8 c8 eb ff ff call 10b1a0 <rtems_filesystem_freenode>
if ( free_old_parentloc )
10c5d8: 83 c4 10 add $0x10,%esp
10c5db: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
10c5df: 75 17 jne 10c5f8 <_rename_r+0x104>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
10c5e1: 83 ec 0c sub $0xc,%esp
10c5e4: 56 push %esi
10c5e5: e8 b6 eb ff ff call 10b1a0 <rtems_filesystem_freenode>
return result;
10c5ea: 83 c4 10 add $0x10,%esp
}
10c5ed: 89 f8 mov %edi,%eax
10c5ef: 8d 65 f4 lea -0xc(%ebp),%esp
10c5f2: 5b pop %ebx
10c5f3: 5e pop %esi
10c5f4: 5f pop %edi
10c5f5: c9 leave
10c5f6: c3 ret
10c5f7: 90 nop
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 );
10c5f8: 83 ec 0c sub $0xc,%esp
10c5fb: ff 75 94 pushl -0x6c(%ebp)
10c5fe: e8 9d eb ff ff call 10b1a0 <rtems_filesystem_freenode>
10c603: 83 c4 10 add $0x10,%esp
10c606: eb d9 jmp 10c5e1 <_rename_r+0xed>
* 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 );
10c608: 83 ec 0c sub $0xc,%esp
10c60b: 53 push %ebx
10c60c: e8 8f eb ff ff call 10b1a0 <rtems_filesystem_freenode>
if ( free_old_parentloc )
10c611: 83 c4 10 add $0x10,%esp
10c614: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
10c618: 74 0e je 10c628 <_rename_r+0x134>
rtems_filesystem_freenode( &old_parent_loc );
10c61a: 83 ec 0c sub $0xc,%esp
10c61d: ff 75 94 pushl -0x6c(%ebp)
10c620: e8 7b eb ff ff call 10b1a0 <rtems_filesystem_freenode>
10c625: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10c628: 83 ec 0c sub $0xc,%esp
10c62b: 56 push %esi
10c62c: e8 6f eb ff ff call 10b1a0 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EXDEV );
10c631: e8 ee a8 00 00 call 116f24 <__errno>
10c636: c7 00 12 00 00 00 movl $0x12,(%eax)
10c63c: 83 c4 10 add $0x10,%esp
10c63f: bf ff ff ff ff mov $0xffffffff,%edi
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
10c644: 89 f8 mov %edi,%eax
10c646: 8d 65 f4 lea -0xc(%ebp),%esp
10c649: 5b pop %ebx
10c64a: 5e pop %esi
10c64b: 5f pop %edi
10c64c: c9 leave
10c64d: c3 ret
10c64e: 66 90 xchg %ax,%ax
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 )
10c650: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
10c654: 75 78 jne 10c6ce <_rename_r+0x1da> <== ALWAYS TAKEN
rtems_filesystem_freenode( &old_parent_loc );
return -1;
10c656: 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;
}
10c65b: 89 f8 mov %edi,%eax <== NOT EXECUTED
10c65d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c660: 5b pop %ebx <== NOT EXECUTED
10c661: 5e pop %esi <== NOT EXECUTED
10c662: 5f pop %edi <== NOT EXECUTED
10c663: c9 leave <== NOT EXECUTED
10c664: c3 ret <== NOT EXECUTED
10c665: 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,
10c668: 89 c2 mov %eax,%edx
10c66a: 83 ec 0c sub $0xc,%esp
10c66d: 6a 00 push $0x0
10c66f: 8d 45 b8 lea -0x48(%ebp),%eax
10c672: 89 45 94 mov %eax,-0x6c(%ebp)
10c675: 50 push %eax
10c676: 6a 02 push $0x2
10c678: 52 push %edx
10c679: 53 push %ebx
10c67a: 89 55 8c mov %edx,-0x74(%ebp)
10c67d: e8 6a e8 ff ff call 10aeec <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
10c682: 83 c4 20 add $0x20,%esp
10c685: 85 c0 test %eax,%eax
10c687: 8b 55 8c mov -0x74(%ebp),%edx
10c68a: 75 ca jne 10c656 <_rename_r+0x162> <== NEVER TAKEN
return -1;
free_old_parentloc = true;
10c68c: c6 45 93 01 movb $0x1,-0x6d(%ebp)
10c690: e9 97 fe ff ff jmp 10c52c <_rename_r+0x38>
10c695: 8d 76 00 lea 0x0(%esi),%esi
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 );
10c698: 83 ec 0c sub $0xc,%esp
10c69b: 53 push %ebx
10c69c: e8 ff ea ff ff call 10b1a0 <rtems_filesystem_freenode>
if ( free_old_parentloc )
10c6a1: 83 c4 10 add $0x10,%esp
10c6a4: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp)
10c6a8: 74 0e je 10c6b8 <_rename_r+0x1c4> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
10c6aa: 83 ec 0c sub $0xc,%esp
10c6ad: ff 75 94 pushl -0x6c(%ebp)
10c6b0: e8 eb ea ff ff call 10b1a0 <rtems_filesystem_freenode>
10c6b5: 83 c4 10 add $0x10,%esp
rtems_filesystem_freenode( &old_loc );
10c6b8: 83 ec 0c sub $0xc,%esp
10c6bb: 56 push %esi
10c6bc: e8 df ea ff ff call 10b1a0 <rtems_filesystem_freenode>
return -1;
10c6c1: 83 c4 10 add $0x10,%esp
10c6c4: bf ff ff ff ff mov $0xffffffff,%edi
10c6c9: e9 1f ff ff ff jmp 10c5ed <_rename_r+0xf9>
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 );
10c6ce: 83 ec 0c sub $0xc,%esp
10c6d1: ff 75 94 pushl -0x6c(%ebp)
10c6d4: e8 c7 ea ff ff call 10b1a0 <rtems_filesystem_freenode>
10c6d9: 83 c4 10 add $0x10,%esp
return -1;
10c6dc: bf ff ff ff ff mov $0xffffffff,%edi
10c6e1: e9 07 ff ff ff jmp 10c5ed <_rename_r+0xf9>
0010adb4 <_times>:
#endif
clock_t _times(
struct tms *ptms
)
{
10adb4: 55 push %ebp
10adb5: 89 e5 mov %esp,%ebp
10adb7: 56 push %esi
10adb8: 53 push %ebx
10adb9: 83 ec 10 sub $0x10,%esp
10adbc: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_interval ticks;
if ( !ptms )
10adbf: 85 db test %ebx,%ebx
10adc1: 74 75 je 10ae38 <_times+0x84>
/*
* This call does not depend on TOD being initialized and can't fail.
*/
ticks = rtems_clock_get_ticks_since_boot();
10adc3: e8 84 04 00 00 call 10b24c <rtems_clock_get_ticks_since_boot>
10adc8: 89 c6 mov %eax,%esi
{
Timestamp_Control per_tick;
uint32_t ticks;
uint32_t fractional_ticks;
_Timestamp_Set(
10adca: 8b 0d 6c 3e 12 00 mov 0x123e6c,%ecx
10add0: ba 83 de 1b 43 mov $0x431bde83,%edx
10add5: 89 c8 mov %ecx,%eax
10add7: f7 e2 mul %edx
10add9: c1 ea 12 shr $0x12,%edx
10addc: 89 55 e8 mov %edx,-0x18(%ebp)
10addf: 8d 04 89 lea (%ecx,%ecx,4),%eax
10ade2: 8d 04 80 lea (%eax,%eax,4),%eax
10ade5: 8d 04 80 lea (%eax,%eax,4),%eax
10ade8: c1 e0 03 shl $0x3,%eax
10adeb: b9 00 ca 9a 3b mov $0x3b9aca00,%ecx
10adf0: 31 d2 xor %edx,%edx
10adf2: f7 f1 div %ecx
10adf4: 89 55 ec mov %edx,-0x14(%ebp)
TOD_MICROSECONDS_PER_SECOND,
(rtems_configuration_get_nanoseconds_per_tick() %
TOD_NANOSECONDS_PER_SECOND)
);
_Timestamp_Divide(
10adf7: 8d 45 f0 lea -0x10(%ebp),%eax
10adfa: 50 push %eax
10adfb: 8d 45 f4 lea -0xc(%ebp),%eax
10adfe: 50 push %eax
10adff: 8d 45 e8 lea -0x18(%ebp),%eax
10ae02: 50 push %eax
10ae03: a1 18 87 12 00 mov 0x128718,%eax
10ae08: 05 84 00 00 00 add $0x84,%eax
10ae0d: 50 push %eax
10ae0e: e8 9d 38 00 00 call 10e6b0 <_Timespec_Divide>
&_Thread_Executing->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
);
ptms->tms_utime = ticks;
10ae13: 8b 45 f4 mov -0xc(%ebp),%eax
10ae16: 89 03 mov %eax,(%ebx)
}
#else
ptms->tms_utime = _Thread_Executing->cpu_time_used;
#endif
ptms->tms_stime = ticks;
10ae18: 89 73 04 mov %esi,0x4(%ebx)
ptms->tms_cutime = 0;
10ae1b: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
ptms->tms_cstime = 0;
10ae22: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
return ticks;
10ae29: 83 c4 10 add $0x10,%esp
10ae2c: 89 f0 mov %esi,%eax
}
10ae2e: 8d 65 f8 lea -0x8(%ebp),%esp
10ae31: 5b pop %ebx
10ae32: 5e pop %esi
10ae33: c9 leave
10ae34: c3 ret
10ae35: 8d 76 00 lea 0x0(%esi),%esi
)
{
rtems_interval ticks;
if ( !ptms )
rtems_set_errno_and_return_minus_one( EFAULT );
10ae38: e8 77 87 00 00 call 1135b4 <__errno>
10ae3d: c7 00 0e 00 00 00 movl $0xe,(%eax)
10ae43: b8 ff ff ff ff mov $0xffffffff,%eax
ptms->tms_stime = ticks;
ptms->tms_cutime = 0;
ptms->tms_cstime = 0;
return ticks;
}
10ae48: 8d 65 f8 lea -0x8(%ebp),%esp
10ae4b: 5b pop %ebx
10ae4c: 5e pop %esi
10ae4d: c9 leave
10ae4e: c3 ret
00109b5c <access>:
int access(
const char *path,
int amode
)
{
109b5c: 55 push %ebp
109b5d: 89 e5 mov %esp,%ebp
109b5f: 53 push %ebx
109b60: 83 ec 5c sub $0x5c,%esp
109b63: 8b 5d 0c mov 0xc(%ebp),%ebx
struct stat statbuf;
if ( stat(path, &statbuf) )
109b66: 8d 45 b0 lea -0x50(%ebp),%eax
109b69: 50 push %eax
109b6a: ff 75 08 pushl 0x8(%ebp)
109b6d: e8 6a 17 00 00 call 10b2dc <stat>
109b72: 83 c4 10 add $0x10,%esp
109b75: 85 c0 test %eax,%eax
109b77: 75 1f jne 109b98 <access+0x3c>
return -1;
if ( amode & R_OK ) {
109b79: f6 c3 04 test $0x4,%bl
109b7c: 75 26 jne 109ba4 <access+0x48>
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
109b7e: f6 c3 02 test $0x2,%bl
109b81: 75 0d jne 109b90 <access+0x34>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
109b83: 83 e3 01 and $0x1,%ebx
109b86: 75 24 jne 109bac <access+0x50>
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
109b88: 31 c0 xor %eax,%eax
}
109b8a: 8b 5d fc mov -0x4(%ebp),%ebx
109b8d: c9 leave
109b8e: c3 ret
109b8f: 90 nop
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
if ( !( statbuf.st_mode & S_IWRITE ) )
109b90: f6 45 bc 80 testb $0x80,-0x44(%ebp)
109b94: 75 ed jne 109b83 <access+0x27>
109b96: 66 90 xchg %ax,%ax
return -1;
109b98: b8 ff ff ff ff mov $0xffffffff,%eax
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
}
109b9d: 8b 5d fc mov -0x4(%ebp),%ebx
109ba0: c9 leave
109ba1: c3 ret
109ba2: 66 90 xchg %ax,%ax
if ( stat(path, &statbuf) )
return -1;
if ( amode & R_OK ) {
if (!( statbuf.st_mode & S_IREAD ))
109ba4: f6 45 bd 01 testb $0x1,-0x43(%ebp)
109ba8: 75 d4 jne 109b7e <access+0x22>
109baa: eb ec jmp 109b98 <access+0x3c>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
109bac: 8b 45 bc mov -0x44(%ebp),%eax
109baf: 83 e0 40 and $0x40,%eax
return -1;
}
return 0;
109bb2: 83 f8 01 cmp $0x1,%eax
109bb5: 19 c0 sbb %eax,%eax
109bb7: eb d1 jmp 109b8a <access+0x2e>
0010b62c <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
10b62c: 55 push %ebp
10b62d: 89 e5 mov %esp,%ebp
10b62f: 57 push %edi
10b630: 56 push %esi
10b631: 53 push %ebx
10b632: 83 ec 1c sub $0x1c,%esp
10b635: 8b 5d 08 mov 0x8(%ebp),%ebx
10b638: 8b 75 0c mov 0xc(%ebp),%esi
long adjustment;
/*
* Simple validations
*/
if ( !delta )
10b63b: 85 db test %ebx,%ebx
10b63d: 0f 84 f1 00 00 00 je 10b734 <adjtime+0x108>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
10b643: 8b 53 04 mov 0x4(%ebx),%edx
10b646: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx
10b64c: 0f 87 e2 00 00 00 ja 10b734 <adjtime+0x108>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
10b652: 85 f6 test %esi,%esi
10b654: 74 10 je 10b666 <adjtime+0x3a>
olddelta->tv_sec = 0;
10b656: c7 06 00 00 00 00 movl $0x0,(%esi)
olddelta->tv_usec = 0;
10b65c: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi)
10b663: 8b 53 04 mov 0x4(%ebx),%edx
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
10b666: 8b 03 mov (%ebx),%eax
10b668: 8d 04 80 lea (%eax,%eax,4),%eax
10b66b: 8d 04 80 lea (%eax,%eax,4),%eax
10b66e: 8d 04 80 lea (%eax,%eax,4),%eax
10b671: 8d 04 80 lea (%eax,%eax,4),%eax
10b674: 8d 04 80 lea (%eax,%eax,4),%eax
10b677: 8d 04 80 lea (%eax,%eax,4),%eax
10b67a: c1 e0 06 shl $0x6,%eax
adjustment += delta->tv_usec;
10b67d: 8d 04 02 lea (%edx,%eax,1),%eax
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
10b680: 3b 05 6c 42 12 00 cmp 0x12426c,%eax
10b686: 73 0c jae 10b694 <adjtime+0x68>
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
10b688: 31 c0 xor %eax,%eax
}
10b68a: 8d 65 f4 lea -0xc(%ebp),%esp
10b68d: 5b pop %ebx
10b68e: 5e pop %esi
10b68f: 5f pop %edi
10b690: c9 leave
10b691: c3 ret
10b692: 66 90 xchg %ax,%ax
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b694: a1 d0 86 12 00 mov 0x1286d0,%eax
10b699: 40 inc %eax
10b69a: a3 d0 86 12 00 mov %eax,0x1286d0
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
10b69f: 83 ec 0c sub $0xc,%esp
10b6a2: 8d 7d e0 lea -0x20(%ebp),%edi
10b6a5: 57 push %edi
10b6a6: e8 85 17 00 00 call 10ce30 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
10b6ab: 8b 03 mov (%ebx),%eax
10b6ad: 01 45 e0 add %eax,-0x20(%ebp)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
10b6b0: 8b 43 04 mov 0x4(%ebx),%eax
10b6b3: 8d 04 80 lea (%eax,%eax,4),%eax
10b6b6: 8d 04 80 lea (%eax,%eax,4),%eax
10b6b9: 8d 04 80 lea (%eax,%eax,4),%eax
10b6bc: c1 e0 03 shl $0x3,%eax
10b6bf: 03 45 e4 add -0x1c(%ebp),%eax
10b6c2: 89 45 e4 mov %eax,-0x1c(%ebp)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
10b6c5: 83 c4 10 add $0x10,%esp
10b6c8: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
10b6cd: 76 18 jbe 10b6e7 <adjtime+0xbb>
10b6cf: 8b 55 e0 mov -0x20(%ebp),%edx
10b6d2: 66 90 xchg %ax,%ax
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
10b6d4: 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(
10b6d9: 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 ) {
10b6da: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax
10b6df: 77 f3 ja 10b6d4 <adjtime+0xa8> <== NEVER TAKEN
10b6e1: 89 45 e4 mov %eax,-0x1c(%ebp)
10b6e4: 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) ) {
10b6e7: 3d 00 36 65 c4 cmp $0xc4653600,%eax
10b6ec: 77 19 ja 10b707 <adjtime+0xdb> <== NEVER TAKEN
10b6ee: 8b 55 e0 mov -0x20(%ebp),%edx
10b6f1: 8d 76 00 lea 0x0(%esi),%esi
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
10b6f4: 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(
10b6f9: 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) ) {
10b6fa: 3d 00 36 65 c4 cmp $0xc4653600,%eax
10b6ff: 76 f3 jbe 10b6f4 <adjtime+0xc8>
10b701: 89 45 e4 mov %eax,-0x1c(%ebp)
10b704: 89 55 e0 mov %edx,-0x20(%ebp)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
10b707: 83 ec 0c sub $0xc,%esp
10b70a: 57 push %edi
10b70b: e8 a8 17 00 00 call 10ceb8 <_TOD_Set>
_Thread_Enable_dispatch();
10b710: e8 bb 2c 00 00 call 10e3d0 <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
10b715: 83 c4 10 add $0x10,%esp
10b718: 85 f6 test %esi,%esi
10b71a: 0f 84 68 ff ff ff je 10b688 <adjtime+0x5c>
*olddelta = *delta;
10b720: 8b 03 mov (%ebx),%eax
10b722: 8b 53 04 mov 0x4(%ebx),%edx
10b725: 89 06 mov %eax,(%esi)
10b727: 89 56 04 mov %edx,0x4(%esi)
return 0;
10b72a: 31 c0 xor %eax,%eax
}
10b72c: 8d 65 f4 lea -0xc(%ebp),%esp
10b72f: 5b pop %ebx
10b730: 5e pop %esi
10b731: 5f pop %edi
10b732: c9 leave
10b733: 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 );
10b734: e8 6f 86 00 00 call 113da8 <__errno>
10b739: c7 00 16 00 00 00 movl $0x16,(%eax)
10b73f: b8 ff ff ff ff mov $0xffffffff,%eax
10b744: e9 41 ff ff ff jmp 10b68a <adjtime+0x5e>
0010bd5c <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
10bd5c: 55 push %ebp
10bd5d: 89 e5 mov %esp,%ebp
10bd5f: 57 push %edi
10bd60: 56 push %esi
10bd61: 53 push %ebx
10bd62: 83 ec 18 sub $0x18,%esp
10bd65: 8b 75 08 mov 0x8(%ebp),%esi
10bd68: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
10bd6b: 68 a0 aa 12 00 push $0x12aaa0
10bd70: e8 bf 11 00 00 call 10cf34 <pthread_mutex_lock>
if (fcntl (fildes, F_GETFD) < 0) {
10bd75: 5a pop %edx
10bd76: 59 pop %ecx
10bd77: 6a 01 push $0x1
10bd79: 56 push %esi
10bd7a: e8 09 6b 00 00 call 112888 <fcntl>
10bd7f: 83 c4 10 add $0x10,%esp
10bd82: 85 c0 test %eax,%eax
10bd84: 0f 88 9b 01 00 00 js 10bf25 <aio_cancel+0x1c9>
pthread_mutex_unlock(&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EBADF);
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
10bd8a: 85 db test %ebx,%ebx
10bd8c: 0f 84 ea 00 00 00 je 10be7c <aio_cancel+0x120>
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
10bd92: 8b 3b mov (%ebx),%edi
10bd94: 39 f7 cmp %esi,%edi
10bd96: 0f 85 b8 00 00 00 jne 10be54 <aio_cancel+0xf8>
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
10bd9c: 56 push %esi
10bd9d: 6a 00 push $0x0
10bd9f: 57 push %edi
10bda0: 68 e8 aa 12 00 push $0x12aae8
10bda5: e8 9e 03 00 00 call 10c148 <rtems_aio_search_fd>
10bdaa: 89 c6 mov %eax,%esi
if (r_chain == NULL) {
10bdac: 83 c4 10 add $0x10,%esp
10bdaf: 85 c0 test %eax,%eax
10bdb1: 74 3d je 10bdf0 <aio_cancel+0x94>
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
10bdb3: 8d 78 1c lea 0x1c(%eax),%edi
10bdb6: 83 ec 0c sub $0xc,%esp
10bdb9: 57 push %edi
10bdba: e8 75 11 00 00 call 10cf34 <pthread_mutex_lock>
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
10bdbf: 58 pop %eax
10bdc0: 5a pop %edx
10bdc1: 53 push %ebx
10bdc2: 83 c6 08 add $0x8,%esi
10bdc5: 56 push %esi
10bdc6: e8 5d 07 00 00 call 10c528 <rtems_aio_remove_req>
10bdcb: 89 c3 mov %eax,%ebx
pthread_mutex_unlock (&r_chain->mutex);
10bdcd: 89 3c 24 mov %edi,(%esp)
10bdd0: e8 e7 11 00 00 call 10cfbc <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
10bdd5: c7 04 24 a0 aa 12 00 movl $0x12aaa0,(%esp)
10bddc: e8 db 11 00 00 call 10cfbc <pthread_mutex_unlock>
return result;
10bde1: 83 c4 10 add $0x10,%esp
}
return AIO_ALLDONE;
}
10bde4: 89 d8 mov %ebx,%eax
10bde6: 8d 65 f4 lea -0xc(%ebp),%esp
10bde9: 5b pop %ebx
10bdea: 5e pop %esi
10bdeb: 5f pop %edi
10bdec: c9 leave
10bded: c3 ret
10bdee: 66 90 xchg %ax,%ax
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
10bdf0: 81 3d f4 aa 12 00 f8 cmpl $0x12aaf8,0x12aaf4
10bdf7: aa 12 00
10bdfa: 74 40 je 10be3c <aio_cancel+0xe0> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
10bdfc: 51 push %ecx
10bdfd: 6a 00 push $0x0
10bdff: 57 push %edi
10be00: 68 f4 aa 12 00 push $0x12aaf4
10be05: e8 3e 03 00 00 call 10c148 <rtems_aio_search_fd>
if (r_chain == NULL) {
10be0a: 83 c4 10 add $0x10,%esp
10be0d: 85 c0 test %eax,%eax
10be0f: 74 43 je 10be54 <aio_cancel+0xf8>
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
10be11: 83 ec 08 sub $0x8,%esp
10be14: 53 push %ebx
10be15: 83 c0 08 add $0x8,%eax
10be18: 50 push %eax
10be19: e8 0a 07 00 00 call 10c528 <rtems_aio_remove_req>
10be1e: 89 c3 mov %eax,%ebx
pthread_mutex_unlock (&aio_request_queue.mutex);
10be20: c7 04 24 a0 aa 12 00 movl $0x12aaa0,(%esp)
10be27: e8 90 11 00 00 call 10cfbc <pthread_mutex_unlock>
return result;
10be2c: 83 c4 10 add $0x10,%esp
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
10be2f: 89 d8 mov %ebx,%eax
10be31: 8d 65 f4 lea -0xc(%ebp),%esp
10be34: 5b pop %ebx
10be35: 5e pop %esi
10be36: 5f pop %edi
10be37: c9 leave
10be38: c3 ret
10be39: 8d 76 00 lea 0x0(%esi),%esi
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
} else {
pthread_mutex_unlock (&aio_request_queue.mutex);
10be3c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10be3f: 68 a0 aa 12 00 push $0x12aaa0 <== NOT EXECUTED
10be44: e8 73 11 00 00 call 10cfbc <pthread_mutex_unlock> <== NOT EXECUTED
return AIO_ALLDONE;
10be49: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10be4c: bb 02 00 00 00 mov $0x2,%ebx <== NOT EXECUTED
10be51: eb 91 jmp 10bde4 <aio_cancel+0x88> <== NOT EXECUTED
10be53: 90 nop <== NOT EXECUTED
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock (&aio_request_queue.mutex);
10be54: 83 ec 0c sub $0xc,%esp
10be57: 68 a0 aa 12 00 push $0x12aaa0
10be5c: e8 5b 11 00 00 call 10cfbc <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
10be61: e8 96 9d 00 00 call 115bfc <__errno>
10be66: c7 00 16 00 00 00 movl $0x16,(%eax)
10be6c: 83 c4 10 add $0x10,%esp
10be6f: bb ff ff ff ff mov $0xffffffff,%ebx
10be74: e9 6b ff ff ff jmp 10bde4 <aio_cancel+0x88>
10be79: 8d 76 00 lea 0x0(%esi),%esi
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
10be7c: 50 push %eax
10be7d: 6a 00 push $0x0
10be7f: 56 push %esi
10be80: 68 e8 aa 12 00 push $0x12aae8
10be85: e8 be 02 00 00 call 10c148 <rtems_aio_search_fd>
10be8a: 89 c3 mov %eax,%ebx
if (r_chain == NULL) {
10be8c: 83 c4 10 add $0x10,%esp
10be8f: 85 c0 test %eax,%eax
10be91: 74 3d je 10bed0 <aio_cancel+0x174>
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
10be93: 8d 70 1c lea 0x1c(%eax),%esi
10be96: 83 ec 0c sub $0xc,%esp
10be99: 56 push %esi
10be9a: e8 95 10 00 00 call 10cf34 <pthread_mutex_lock>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10be9f: 89 1c 24 mov %ebx,(%esp)
10bea2: e8 55 2a 00 00 call 10e8fc <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
10bea7: 89 1c 24 mov %ebx,(%esp)
10beaa: e8 29 06 00 00 call 10c4d8 <rtems_aio_remove_fd>
pthread_mutex_unlock (&r_chain->mutex);
10beaf: 89 34 24 mov %esi,(%esp)
10beb2: e8 05 11 00 00 call 10cfbc <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
10beb7: c7 04 24 a0 aa 12 00 movl $0x12aaa0,(%esp)
10bebe: e8 f9 10 00 00 call 10cfbc <pthread_mutex_unlock>
return AIO_CANCELED;
10bec3: 83 c4 10 add $0x10,%esp
10bec6: 31 db xor %ebx,%ebx
10bec8: e9 17 ff ff ff jmp 10bde4 <aio_cancel+0x88>
10becd: 8d 76 00 lea 0x0(%esi),%esi
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
10bed0: 81 3d f4 aa 12 00 f8 cmpl $0x12aaf8,0x12aaf4
10bed7: aa 12 00
10beda: 0f 84 5c ff ff ff je 10be3c <aio_cancel+0xe0> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
10bee0: 57 push %edi
10bee1: 6a 00 push $0x0
10bee3: 56 push %esi
10bee4: 68 f4 aa 12 00 push $0x12aaf4
10bee9: e8 5a 02 00 00 call 10c148 <rtems_aio_search_fd>
10beee: 89 c3 mov %eax,%ebx
if (r_chain == NULL) {
10bef0: 83 c4 10 add $0x10,%esp
10bef3: 85 c0 test %eax,%eax
10bef5: 74 53 je 10bf4a <aio_cancel+0x1ee> <== NEVER TAKEN
10bef7: 83 ec 0c sub $0xc,%esp
10befa: 50 push %eax
10befb: e8 fc 29 00 00 call 10e8fc <_Chain_Extract>
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
10bf00: 89 1c 24 mov %ebx,(%esp)
10bf03: e8 d0 05 00 00 call 10c4d8 <rtems_aio_remove_fd>
pthread_mutex_destroy (&r_chain->mutex);
10bf08: 8d 73 1c lea 0x1c(%ebx),%esi
10bf0b: 89 34 24 mov %esi,(%esp)
10bf0e: e8 b5 0d 00 00 call 10ccc8 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->mutex);
10bf13: 89 34 24 mov %esi,(%esp)
10bf16: e8 69 0a 00 00 call 10c984 <pthread_cond_destroy>
free (r_chain);
10bf1b: 89 1c 24 mov %ebx,(%esp)
10bf1e: e8 31 cc ff ff call 108b54 <free>
10bf23: eb 92 jmp 10beb7 <aio_cancel+0x15b>
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
if (fcntl (fildes, F_GETFD) < 0) {
pthread_mutex_unlock(&aio_request_queue.mutex);
10bf25: 83 ec 0c sub $0xc,%esp
10bf28: 68 a0 aa 12 00 push $0x12aaa0
10bf2d: e8 8a 10 00 00 call 10cfbc <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
10bf32: e8 c5 9c 00 00 call 115bfc <__errno>
10bf37: c7 00 09 00 00 00 movl $0x9,(%eax)
10bf3d: 83 c4 10 add $0x10,%esp
10bf40: bb ff ff ff ff mov $0xffffffff,%ebx
10bf45: e9 9a fe ff ff jmp 10bde4 <aio_cancel+0x88>
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock(&aio_request_queue.mutex);
10bf4a: 83 ec 0c sub $0xc,%esp
10bf4d: 68 a0 aa 12 00 push $0x12aaa0
10bf52: e8 65 10 00 00 call 10cfbc <pthread_mutex_unlock>
return AIO_ALLDONE;
10bf57: 83 c4 10 add $0x10,%esp
10bf5a: b3 02 mov $0x2,%bl
10bf5c: e9 83 fe ff ff jmp 10bde4 <aio_cancel+0x88>
0010bf70 <aio_fsync>:
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
10bf70: 55 push %ebp
10bf71: 89 e5 mov %esp,%ebp
10bf73: 53 push %ebx
10bf74: 83 ec 04 sub $0x4,%esp
10bf77: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
10bf7a: 81 7d 08 00 20 00 00 cmpl $0x2000,0x8(%ebp)
10bf81: 75 41 jne 10bfc4 <aio_fsync+0x54>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10bf83: 83 ec 08 sub $0x8,%esp
10bf86: 6a 03 push $0x3
10bf88: ff 33 pushl (%ebx)
10bf8a: e8 f9 68 00 00 call 112888 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10bf8f: 83 e0 03 and $0x3,%eax
10bf92: 48 dec %eax
10bf93: 83 c4 10 add $0x10,%esp
10bf96: 83 f8 01 cmp $0x1,%eax
10bf99: 77 4d ja 10bfe8 <aio_fsync+0x78>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
10bf9b: 83 ec 0c sub $0xc,%esp
10bf9e: 6a 18 push $0x18
10bfa0: e8 c3 d0 ff ff call 109068 <malloc>
if (req == NULL)
10bfa5: 83 c4 10 add $0x10,%esp
10bfa8: 85 c0 test %eax,%eax
10bfaa: 74 57 je 10c003 <aio_fsync+0x93> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
10bfac: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_SYNC;
10bfaf: c7 43 2c 03 00 00 00 movl $0x3,0x2c(%ebx)
return rtems_aio_enqueue (req);
10bfb6: 89 45 08 mov %eax,0x8(%ebp)
}
10bfb9: 8b 5d fc mov -0x4(%ebp),%ebx
10bfbc: c9 leave
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
10bfbd: e9 d6 05 00 00 jmp 10c598 <rtems_aio_enqueue>
10bfc2: 66 90 xchg %ax,%ax
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10bfc4: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10bfcb: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10bfd2: e8 25 9c 00 00 call 115bfc <__errno>
10bfd7: c7 00 16 00 00 00 movl $0x16,(%eax)
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
10bfdd: b8 ff ff ff ff mov $0xffffffff,%eax
10bfe2: 8b 5d fc mov -0x4(%ebp),%ebx
10bfe5: c9 leave
10bfe6: c3 ret
10bfe7: 90 nop
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10bfe8: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10bfef: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10bff6: e8 01 9c 00 00 call 115bfc <__errno>
10bffb: c7 00 09 00 00 00 movl $0x9,(%eax)
10c001: eb da jmp 10bfdd <aio_fsync+0x6d>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10c003: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10c00a: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10c011: e8 e6 9b 00 00 call 115bfc <__errno> <== NOT EXECUTED
10c016: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10c01c: eb bf jmp 10bfdd <aio_fsync+0x6d> <== NOT EXECUTED
0010c7a8 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
10c7a8: 55 push %ebp
10c7a9: 89 e5 mov %esp,%ebp
10c7ab: 53 push %ebx
10c7ac: 83 ec 0c sub $0xc,%esp
10c7af: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10c7b2: 6a 03 push $0x3
10c7b4: ff 33 pushl (%ebx)
10c7b6: e8 cd 60 00 00 call 112888 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10c7bb: 83 c4 10 add $0x10,%esp
10c7be: 83 e0 03 and $0x3,%eax
10c7c1: 74 05 je 10c7c8 <aio_read+0x20> <== NEVER TAKEN
10c7c3: 83 f8 02 cmp $0x2,%eax
10c7c6: 75 38 jne 10c800 <aio_read+0x58>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10c7c8: 8b 53 14 mov 0x14(%ebx),%edx
10c7cb: 85 d2 test %edx,%edx
10c7cd: 75 55 jne 10c824 <aio_read+0x7c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10c7cf: 8b 43 08 mov 0x8(%ebx),%eax
10c7d2: 85 c0 test %eax,%eax
10c7d4: 78 4e js 10c824 <aio_read+0x7c>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
10c7d6: 83 ec 0c sub $0xc,%esp
10c7d9: 6a 18 push $0x18
10c7db: e8 88 c8 ff ff call 109068 <malloc>
if (req == NULL)
10c7e0: 83 c4 10 add $0x10,%esp
10c7e3: 85 c0 test %eax,%eax
10c7e5: 74 58 je 10c83f <aio_read+0x97> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
10c7e7: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_READ;
10c7ea: c7 43 2c 01 00 00 00 movl $0x1,0x2c(%ebx)
return rtems_aio_enqueue (req);
10c7f1: 89 45 08 mov %eax,0x8(%ebp)
}
10c7f4: 8b 5d fc mov -0x4(%ebp),%ebx
10c7f7: c9 leave
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
10c7f8: e9 9b fd ff ff jmp 10c598 <rtems_aio_enqueue>
10c7fd: 8d 76 00 lea 0x0(%esi),%esi
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10c800: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10c807: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c80e: e8 e9 93 00 00 call 115bfc <__errno>
10c813: c7 00 09 00 00 00 movl $0x9,(%eax)
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
return rtems_aio_enqueue (req);
}
10c819: b8 ff ff ff ff mov $0xffffffff,%eax
10c81e: 8b 5d fc mov -0x4(%ebp),%ebx
10c821: c9 leave
10c822: c3 ret
10c823: 90 nop
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10c824: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10c82b: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c832: e8 c5 93 00 00 call 115bfc <__errno>
10c837: c7 00 16 00 00 00 movl $0x16,(%eax)
10c83d: eb da jmp 10c819 <aio_read+0x71>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10c83f: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10c846: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10c84d: e8 aa 93 00 00 call 115bfc <__errno> <== NOT EXECUTED
10c852: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10c858: eb bf jmp 10c819 <aio_read+0x71> <== NOT EXECUTED
0010c868 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
10c868: 55 push %ebp
10c869: 89 e5 mov %esp,%ebp
10c86b: 53 push %ebx
10c86c: 83 ec 0c sub $0xc,%esp
10c86f: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
10c872: 6a 03 push $0x3
10c874: ff 33 pushl (%ebx)
10c876: e8 0d 60 00 00 call 112888 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
10c87b: 83 e0 03 and $0x3,%eax
10c87e: 48 dec %eax
10c87f: 83 c4 10 add $0x10,%esp
10c882: 83 f8 01 cmp $0x1,%eax
10c885: 77 35 ja 10c8bc <aio_write+0x54>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
10c887: 8b 53 14 mov 0x14(%ebx),%edx
10c88a: 85 d2 test %edx,%edx
10c88c: 75 52 jne 10c8e0 <aio_write+0x78>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
10c88e: 8b 43 08 mov 0x8(%ebx),%eax
10c891: 85 c0 test %eax,%eax
10c893: 78 4b js 10c8e0 <aio_write+0x78>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
10c895: 83 ec 0c sub $0xc,%esp
10c898: 6a 18 push $0x18
10c89a: e8 c9 c7 ff ff call 109068 <malloc>
if (req == NULL)
10c89f: 83 c4 10 add $0x10,%esp
10c8a2: 85 c0 test %eax,%eax
10c8a4: 74 55 je 10c8fb <aio_write+0x93> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
10c8a6: 89 58 14 mov %ebx,0x14(%eax)
req->aiocbp->aio_lio_opcode = LIO_WRITE;
10c8a9: c7 43 2c 02 00 00 00 movl $0x2,0x2c(%ebx)
return rtems_aio_enqueue (req);
10c8b0: 89 45 08 mov %eax,0x8(%ebp)
}
10c8b3: 8b 5d fc mov -0x4(%ebp),%ebx
10c8b6: c9 leave
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
10c8b7: e9 dc fc ff ff jmp 10c598 <rtems_aio_enqueue>
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
10c8bc: c7 43 30 09 00 00 00 movl $0x9,0x30(%ebx)
10c8c3: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c8ca: e8 2d 93 00 00 call 115bfc <__errno>
10c8cf: c7 00 09 00 00 00 movl $0x9,(%eax)
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
return rtems_aio_enqueue (req);
}
10c8d5: b8 ff ff ff ff mov $0xffffffff,%eax
10c8da: 8b 5d fc mov -0x4(%ebp),%ebx
10c8dd: c9 leave
10c8de: c3 ret
10c8df: 90 nop
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
10c8e0: c7 43 30 16 00 00 00 movl $0x16,0x30(%ebx)
10c8e7: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx)
10c8ee: e8 09 93 00 00 call 115bfc <__errno>
10c8f3: c7 00 16 00 00 00 movl $0x16,(%eax)
10c8f9: eb da jmp 10c8d5 <aio_write+0x6d>
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
10c8fb: c7 43 30 0b 00 00 00 movl $0xb,0x30(%ebx) <== NOT EXECUTED
10c902: c7 43 34 ff ff ff ff movl $0xffffffff,0x34(%ebx) <== NOT EXECUTED
10c909: e8 ee 92 00 00 call 115bfc <__errno> <== NOT EXECUTED
10c90e: c7 00 0b 00 00 00 movl $0xb,(%eax) <== NOT EXECUTED
10c914: eb bf jmp 10c8d5 <aio_write+0x6d> <== NOT EXECUTED
00109310 <cfsetospeed>:
int cfsetospeed(
struct termios *tp,
speed_t speed
)
{
109310: 55 push %ebp
109311: 89 e5 mov %esp,%ebp
109313: 83 ec 08 sub $0x8,%esp
109316: 8b 4d 08 mov 0x8(%ebp),%ecx
109319: 8b 55 0c mov 0xc(%ebp),%edx
if ( speed & ~CBAUD )
10931c: f7 c2 f0 ef ff ff test $0xffffeff0,%edx
109322: 75 14 jne 109338 <cfsetospeed+0x28>
rtems_set_errno_and_return_minus_one( EINVAL );
tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed;
109324: 8b 41 08 mov 0x8(%ecx),%eax
109327: 25 f0 ef ff ff and $0xffffeff0,%eax
10932c: 09 d0 or %edx,%eax
10932e: 89 41 08 mov %eax,0x8(%ecx)
return 0;
109331: 31 c0 xor %eax,%eax
}
109333: c9 leave
109334: c3 ret
109335: 8d 76 00 lea 0x0(%esi),%esi
struct termios *tp,
speed_t speed
)
{
if ( speed & ~CBAUD )
rtems_set_errno_and_return_minus_one( EINVAL );
109338: e8 1f bb 00 00 call 114e5c <__errno>
10933d: c7 00 16 00 00 00 movl $0x16,(%eax)
109343: b8 ff ff ff ff mov $0xffffffff,%eax
tp->c_cflag = (tp->c_cflag & ~CBAUD) | speed;
return 0;
}
109348: c9 leave
109349: c3 ret
00110738 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
110738: 55 push %ebp
110739: 89 e5 mov %esp,%ebp
11073b: 57 push %edi
11073c: 56 push %esi
11073d: 83 ec 20 sub $0x20,%esp
110740: 8b 55 08 mov 0x8(%ebp),%edx
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
110743: 85 d2 test %edx,%edx
110745: 74 75 je 1107bc <chdir+0x84>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
110747: 31 c0 xor %eax,%eax
110749: b9 ff ff ff ff mov $0xffffffff,%ecx
11074e: 89 d7 mov %edx,%edi
110750: f2 ae repnz scas %es:(%edi),%al
110752: f7 d1 not %ecx
110754: 49 dec %ecx
110755: 83 ec 0c sub $0xc,%esp
110758: 6a 01 push $0x1
11075a: 8d 75 e4 lea -0x1c(%ebp),%esi
11075d: 56 push %esi
11075e: 6a 01 push $0x1
110760: 51 push %ecx
110761: 52 push %edx
110762: e8 d1 7c ff ff call 108438 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
110767: 83 c4 20 add $0x20,%esp
11076a: 85 c0 test %eax,%eax
11076c: 74 0e je 11077c <chdir+0x44>
return -1;
11076e: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
110773: 8d 65 f8 lea -0x8(%ebp),%esp
110776: 5e pop %esi
110777: 5f pop %edi
110778: c9 leave
110779: c3 ret
11077a: 66 90 xchg %ax,%ax
return -1;
/*
* Verify you can change directory into this node.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
11077c: 83 ec 0c sub $0xc,%esp
11077f: 56 push %esi
110780: 8b 45 f0 mov -0x10(%ebp),%eax
110783: ff 50 10 call *0x10(%eax)
110786: 83 c4 10 add $0x10,%esp
110789: 48 dec %eax
11078a: 75 48 jne 1107d4 <chdir+0x9c>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
11078c: 83 ec 0c sub $0xc,%esp
11078f: a1 90 63 12 00 mov 0x126390,%eax
110794: 83 c0 04 add $0x4,%eax
110797: 50 push %eax
110798: e8 73 7d ff ff call 108510 <rtems_filesystem_freenode>
rtems_filesystem_current = loc;
11079d: 8b 3d 90 63 12 00 mov 0x126390,%edi
1107a3: 83 c7 04 add $0x4,%edi
1107a6: b9 05 00 00 00 mov $0x5,%ecx
1107ab: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
1107ad: 83 c4 10 add $0x10,%esp
1107b0: 31 c0 xor %eax,%eax
}
1107b2: 8d 65 f8 lea -0x8(%ebp),%esp
1107b5: 5e pop %esi
1107b6: 5f pop %edi
1107b7: c9 leave
1107b8: c3 ret
1107b9: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
1107bc: e8 cf 33 00 00 call 113b90 <__errno>
1107c1: c7 00 0e 00 00 00 movl $0xe,(%eax)
1107c7: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
1107cc: 8d 65 f8 lea -0x8(%ebp),%esp
1107cf: 5e pop %esi
1107d0: 5f pop %edi
1107d1: c9 leave
1107d2: c3 ret
1107d3: 90 nop
/*
* Verify you can change directory into this node.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
1107d4: 83 ec 0c sub $0xc,%esp
1107d7: 56 push %esi
1107d8: e8 33 7d ff ff call 108510 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( ENOTDIR );
1107dd: e8 ae 33 00 00 call 113b90 <__errno>
1107e2: c7 00 14 00 00 00 movl $0x14,(%eax)
1107e8: 83 c4 10 add $0x10,%esp
1107eb: b8 ff ff ff ff mov $0xffffffff,%eax
1107f0: eb 81 jmp 110773 <chdir+0x3b>
001082a0 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
1082a0: 55 push %ebp
1082a1: 89 e5 mov %esp,%ebp
1082a3: 57 push %edi
1082a4: 56 push %esi
1082a5: 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) {
1082a8: 81 3d 90 63 12 00 80 cmpl $0x128680,0x126390
1082af: 86 12 00
1082b2: 74 60 je 108314 <chroot+0x74>
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);
1082b4: 83 ec 0c sub $0xc,%esp
1082b7: ff 75 08 pushl 0x8(%ebp)
1082ba: e8 79 84 00 00 call 110738 <chdir>
if (result) {
1082bf: 83 c4 10 add $0x10,%esp
1082c2: 85 c0 test %eax,%eax
1082c4: 75 72 jne 108338 <chroot+0x98>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
1082c6: 83 ec 0c sub $0xc,%esp
1082c9: 6a 00 push $0x0
1082cb: 8d 75 e4 lea -0x1c(%ebp),%esi
1082ce: 56 push %esi
1082cf: 6a 00 push $0x0
1082d1: 6a 01 push $0x1
1082d3: 68 96 22 12 00 push $0x122296
1082d8: e8 5b 01 00 00 call 108438 <rtems_filesystem_evaluate_path>
1082dd: 83 c4 20 add $0x20,%esp
1082e0: 85 c0 test %eax,%eax
1082e2: 75 54 jne 108338 <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);
1082e4: 83 ec 0c sub $0xc,%esp
1082e7: a1 90 63 12 00 mov 0x126390,%eax
1082ec: 83 c0 18 add $0x18,%eax
1082ef: 50 push %eax
1082f0: e8 1b 02 00 00 call 108510 <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
1082f5: 8b 3d 90 63 12 00 mov 0x126390,%edi
1082fb: 83 c7 18 add $0x18,%edi
1082fe: b9 05 00 00 00 mov $0x5,%ecx
108303: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
108305: 83 c4 10 add $0x10,%esp
108308: 31 c0 xor %eax,%eax
}
10830a: 8d 65 f8 lea -0x8(%ebp),%esp
10830d: 5e pop %esi
10830e: 5f pop %edi
10830f: c9 leave
108310: c3 ret
108311: 8d 76 00 lea 0x0(%esi),%esi
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*/
108314: e8 cf 12 00 00 call 1095e8 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
108319: 81 3d 90 63 12 00 80 cmpl $0x128680,0x126390
108320: 86 12 00
108323: 75 8f jne 1082b4 <chroot+0x14>
rtems_set_errno_and_return_minus_one( ENOTSUP );
108325: e8 66 b8 00 00 call 113b90 <__errno>
10832a: c7 00 86 00 00 00 movl $0x86,(%eax)
108330: 83 c8 ff or $0xffffffff,%eax
108333: eb d5 jmp 10830a <chroot+0x6a>
108335: 8d 76 00 lea 0x0(%esi),%esi
}
/* 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 );
108338: e8 53 b8 00 00 call 113b90 <__errno>
10833d: 89 c6 mov %eax,%esi
10833f: e8 4c b8 00 00 call 113b90 <__errno>
108344: 8b 00 mov (%eax),%eax
108346: 89 06 mov %eax,(%esi)
108348: b8 ff ff ff ff mov $0xffffffff,%eax
10834d: eb bb jmp 10830a <chroot+0x6a>
0010b49c <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
10b49c: 55 push %ebp
10b49d: 89 e5 mov %esp,%ebp
10b49f: 83 ec 08 sub $0x8,%esp
10b4a2: 8b 45 08 mov 0x8(%ebp),%eax
10b4a5: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
10b4a8: 85 d2 test %edx,%edx
10b4aa: 74 14 je 10b4c0 <clock_gettime+0x24>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10b4ac: 83 f8 01 cmp $0x1,%eax
10b4af: 74 47 je 10b4f8 <clock_gettime+0x5c>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
10b4b1: 83 f8 04 cmp $0x4,%eax
10b4b4: 74 32 je 10b4e8 <clock_gettime+0x4c> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
10b4b6: 83 f8 02 cmp $0x2,%eax
10b4b9: 74 2d je 10b4e8 <clock_gettime+0x4c>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
10b4bb: 83 f8 03 cmp $0x3,%eax
10b4be: 74 14 je 10b4d4 <clock_gettime+0x38>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
10b4c0: e8 1b 8e 00 00 call 1142e0 <__errno>
10b4c5: c7 00 16 00 00 00 movl $0x16,(%eax)
10b4cb: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10b4d0: c9 leave
10b4d1: c3 ret
10b4d2: 66 90 xchg %ax,%ax
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
10b4d4: e8 07 8e 00 00 call 1142e0 <__errno>
10b4d9: c7 00 58 00 00 00 movl $0x58,(%eax)
10b4df: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b4e4: c9 leave
10b4e5: c3 ret
10b4e6: 66 90 xchg %ax,%ax
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
10b4e8: 83 ec 0c sub $0xc,%esp
10b4eb: 52 push %edx
10b4ec: e8 93 1e 00 00 call 10d384 <_TOD_Get_uptime_as_timespec>
return 0;
10b4f1: 83 c4 10 add $0x10,%esp
10b4f4: 31 c0 xor %eax,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b4f6: c9 leave
10b4f7: c3 ret
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
10b4f8: 83 ec 0c sub $0xc,%esp
10b4fb: 52 push %edx
10b4fc: e8 2f 1e 00 00 call 10d330 <_TOD_Get>
return 0;
10b501: 83 c4 10 add $0x10,%esp
10b504: 31 c0 xor %eax,%eax
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b506: c9 leave
10b507: c3 ret
0010b508 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
10b508: 55 push %ebp
10b509: 89 e5 mov %esp,%ebp
10b50b: 83 ec 08 sub $0x8,%esp
10b50e: 8b 45 08 mov 0x8(%ebp),%eax
10b511: 8b 55 0c mov 0xc(%ebp),%edx
if ( !tp )
10b514: 85 d2 test %edx,%edx
10b516: 74 0f je 10b527 <clock_settime+0x1f> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
10b518: 83 f8 01 cmp $0x1,%eax
10b51b: 74 1f je 10b53c <clock_settime+0x34>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
10b51d: 83 f8 02 cmp $0x2,%eax
10b520: 74 42 je 10b564 <clock_settime+0x5c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
10b522: 83 f8 03 cmp $0x3,%eax
10b525: 74 3d je 10b564 <clock_settime+0x5c>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
10b527: e8 b4 8d 00 00 call 1142e0 <__errno>
10b52c: c7 00 16 00 00 00 movl $0x16,(%eax)
10b532: b8 ff ff ff ff mov $0xffffffff,%eax
return 0;
}
10b537: c9 leave
10b538: c3 ret
10b539: 8d 76 00 lea 0x0(%esi),%esi
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
10b53c: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx)
10b542: 76 e3 jbe 10b527 <clock_settime+0x1f>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b544: a1 50 9e 12 00 mov 0x129e50,%eax
10b549: 40 inc %eax
10b54a: a3 50 9e 12 00 mov %eax,0x129e50
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
10b54f: 83 ec 0c sub $0xc,%esp
10b552: 52 push %edx
10b553: e8 84 1e 00 00 call 10d3dc <_TOD_Set>
_Thread_Enable_dispatch();
10b558: e8 97 33 00 00 call 10e8f4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
10b55d: 83 c4 10 add $0x10,%esp
10b560: 31 c0 xor %eax,%eax
}
10b562: c9 leave
10b563: 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 );
10b564: e8 77 8d 00 00 call 1142e0 <__errno>
10b569: c7 00 58 00 00 00 movl $0x58,(%eax)
10b56f: b8 ff ff ff ff mov $0xffffffff,%eax
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
10b574: c9 leave
10b575: c3 ret
0010fc9c <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
10fc9c: 55 push %ebp
10fc9d: 89 e5 mov %esp,%ebp
10fc9f: 53 push %ebx
10fca0: 83 ec 14 sub $0x14,%esp
10fca3: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
10fca6: 3b 05 2c 3a 12 00 cmp 0x123a2c,%eax
10fcac: 73 46 jae 10fcf4 <close+0x58>
iop = rtems_libio_iop(fd);
10fcae: c1 e0 03 shl $0x3,%eax
10fcb1: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
10fcb8: 29 c3 sub %eax,%ebx
10fcba: 03 1d e0 7c 12 00 add 0x127ce0,%ebx
rtems_libio_check_is_open(iop);
10fcc0: f6 43 15 01 testb $0x1,0x15(%ebx)
10fcc4: 74 2e je 10fcf4 <close+0x58>
rc = RTEMS_SUCCESSFUL;
rc = (*iop->pathinfo.handlers->close_h)( iop );
10fcc6: 83 ec 0c sub $0xc,%esp
10fcc9: 8b 43 20 mov 0x20(%ebx),%eax
10fccc: 53 push %ebx
10fccd: ff 50 04 call *0x4(%eax)
rtems_filesystem_freenode( &iop->pathinfo );
10fcd0: 8d 53 18 lea 0x18(%ebx),%edx
10fcd3: 89 14 24 mov %edx,(%esp)
10fcd6: 89 45 f4 mov %eax,-0xc(%ebp)
10fcd9: e8 e2 83 ff ff call 1080c0 <rtems_filesystem_freenode>
rtems_libio_free( iop );
10fcde: 89 1c 24 mov %ebx,(%esp)
10fce1: e8 26 02 00 00 call 10ff0c <rtems_libio_free>
return rc;
10fce6: 83 c4 10 add $0x10,%esp
10fce9: 8b 45 f4 mov -0xc(%ebp),%eax
}
10fcec: 8b 5d fc mov -0x4(%ebp),%ebx
10fcef: c9 leave
10fcf0: c3 ret
10fcf1: 8d 76 00 lea 0x0(%esi),%esi
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
10fcf4: e8 eb 35 00 00 call 1132e4 <__errno>
10fcf9: c7 00 09 00 00 00 movl $0x9,(%eax)
10fcff: b8 ff ff ff ff mov $0xffffffff,%eax
10fd04: eb e6 jmp 10fcec <close+0x50>
0010822c <ctermid>:
static char *ctermid_name = "/dev/console";
char *ctermid(
char *s
)
{
10822c: 55 push %ebp
10822d: 89 e5 mov %esp,%ebp
10822f: 57 push %edi
108230: 56 push %esi
108231: 8b 45 08 mov 0x8(%ebp),%eax
if ( !s )
108234: 85 c0 test %eax,%eax
108236: 74 14 je 10824c <ctermid+0x20>
/*
* We have no way of knowing the length of the user provided buffer.
* It may not be large enough but there is no way to know that. :(
* So this is a potential buffer owerrun that we can do nothing about.
*/
strcpy( s, ctermid_name );
108238: be 63 df 11 00 mov $0x11df63,%esi
10823d: b9 0d 00 00 00 mov $0xd,%ecx
108242: 89 c7 mov %eax,%edi
108244: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
return s;
}
108246: 5e pop %esi
108247: 5f pop %edi
108248: c9 leave
108249: c3 ret
10824a: 66 90 xchg %ax,%ax
char *ctermid(
char *s
)
{
if ( !s )
return ctermid_name;
10824c: b8 63 df 11 00 mov $0x11df63,%eax
* It may not be large enough but there is no way to know that. :(
* So this is a potential buffer owerrun that we can do nothing about.
*/
strcpy( s, ctermid_name );
return s;
}
108251: 5e pop %esi
108252: 5f pop %edi
108253: c9 leave
108254: c3 ret
0010eed8 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
10eed8: 55 push %ebp
10eed9: 89 e5 mov %esp,%ebp
10eedb: 57 push %edi
10eedc: 56 push %esi
10eedd: 53 push %ebx
10eede: 83 ec 1c sub $0x1c,%esp
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
10eee1: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp)
10eee8: 0f 85 96 00 00 00 jne 10ef84 <devFS_evaluate_path+0xac><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
10eeee: 8b 45 14 mov 0x14(%ebp),%eax
10eef1: 8b 00 mov (%eax),%eax
10eef3: 89 45 e4 mov %eax,-0x1c(%ebp)
if (!device_name_table)
10eef6: 85 c0 test %eax,%eax
10eef8: 0f 84 98 00 00 00 je 10ef96 <devFS_evaluate_path+0xbe>
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
10eefe: 8b 15 d0 15 12 00 mov 0x1215d0,%edx
10ef04: 89 55 e0 mov %edx,-0x20(%ebp)
10ef07: 85 d2 test %edx,%edx
10ef09: 74 38 je 10ef43 <devFS_evaluate_path+0x6b><== NEVER TAKEN
10ef0b: 31 c0 xor %eax,%eax
10ef0d: 31 db xor %ebx,%ebx
if (!device_name_table[i].device_name)
10ef0f: 8d 04 80 lea (%eax,%eax,4),%eax
10ef12: 8b 55 e4 mov -0x1c(%ebp),%edx
10ef15: 8d 3c 82 lea (%edx,%eax,4),%edi
10ef18: 8b 37 mov (%edi),%esi
10ef1a: 85 f6 test %esi,%esi
10ef1c: 74 1d je 10ef3b <devFS_evaluate_path+0x63>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
10ef1e: 50 push %eax
10ef1f: ff 75 0c pushl 0xc(%ebp)
10ef22: 56 push %esi
10ef23: ff 75 08 pushl 0x8(%ebp)
10ef26: e8 b9 31 00 00 call 1120e4 <strncmp>
10ef2b: 83 c4 10 add $0x10,%esp
10ef2e: 85 c0 test %eax,%eax
10ef30: 75 09 jne 10ef3b <devFS_evaluate_path+0x63>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
10ef32: 8b 45 0c mov 0xc(%ebp),%eax
10ef35: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1)
10ef39: 74 21 je 10ef5c <devFS_evaluate_path+0x84><== 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++) {
10ef3b: 43 inc %ebx
10ef3c: 89 d8 mov %ebx,%eax
10ef3e: 39 5d e0 cmp %ebx,-0x20(%ebp)
10ef41: 77 cc ja 10ef0f <devFS_evaluate_path+0x37>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
10ef43: e8 60 25 00 00 call 1114a8 <__errno>
10ef48: c7 00 02 00 00 00 movl $0x2,(%eax)
10ef4e: b8 ff ff ff ff mov $0xffffffff,%eax
}
10ef53: 8d 65 f4 lea -0xc(%ebp),%esp
10ef56: 5b pop %ebx
10ef57: 5e pop %esi
10ef58: 5f pop %edi
10ef59: c9 leave
10ef5a: c3 ret
10ef5b: 90 nop
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
10ef5c: 8b 55 14 mov 0x14(%ebp),%edx
10ef5f: 89 3a mov %edi,(%edx)
pathloc->handlers = &devFS_file_handlers;
10ef61: c7 42 08 40 35 12 00 movl $0x123540,0x8(%edx)
pathloc->ops = &devFS_ops;
10ef68: c7 42 0c e0 34 12 00 movl $0x1234e0,0xc(%edx)
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
10ef6f: a1 b0 36 12 00 mov 0x1236b0,%eax
10ef74: 8b 40 28 mov 0x28(%eax),%eax
10ef77: 89 42 10 mov %eax,0x10(%edx)
return 0;
10ef7a: 31 c0 xor %eax,%eax
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
10ef7c: 8d 65 f4 lea -0xc(%ebp),%esp
10ef7f: 5b pop %ebx
10ef80: 5e pop %esi
10ef81: 5f pop %edi
10ef82: c9 leave
10ef83: c3 ret
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
10ef84: e8 1f 25 00 00 call 1114a8 <__errno> <== NOT EXECUTED
10ef89: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED
10ef8f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10ef94: eb e6 jmp 10ef7c <devFS_evaluate_path+0xa4><== NOT EXECUTED
/* 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 );
10ef96: e8 0d 25 00 00 call 1114a8 <__errno>
10ef9b: c7 00 0e 00 00 00 movl $0xe,(%eax)
10efa1: 83 c8 ff or $0xffffffff,%eax
10efa4: eb d6 jmp 10ef7c <devFS_evaluate_path+0xa4>
00107b00 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
107b00: 55 push %ebp
107b01: 89 e5 mov %esp,%ebp
107b03: 83 ec 1c sub $0x1c,%esp
107b06: 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;
107b09: 8b 42 18 mov 0x18(%edx),%eax
args.iop = iop;
107b0c: 89 55 e8 mov %edx,-0x18(%ebp)
args.command = command;
107b0f: 8b 55 0c mov 0xc(%ebp),%edx
107b12: 89 55 ec mov %edx,-0x14(%ebp)
args.buffer = buffer;
107b15: 8b 55 10 mov 0x10(%ebp),%edx
107b18: 89 55 f0 mov %edx,-0x10(%ebp)
status = rtems_io_control(
np->major,
np->minor,
(void *) &args
107b1b: 8d 55 e8 lea -0x18(%ebp),%edx
args.iop = iop;
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
107b1e: 52 push %edx
107b1f: ff 70 0c pushl 0xc(%eax)
107b22: ff 70 08 pushl 0x8(%eax)
107b25: e8 3e 40 00 00 call 10bb68 <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
107b2a: 83 c4 10 add $0x10,%esp
107b2d: 85 c0 test %eax,%eax
107b2f: 75 07 jne 107b38 <devFS_ioctl+0x38>
return rtems_deviceio_errno(status);
return args.ioctl_return;
107b31: 8b 45 f4 mov -0xc(%ebp),%eax
}
107b34: c9 leave
107b35: c3 ret
107b36: 66 90 xchg %ax,%ax
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
107b38: 83 ec 0c sub $0xc,%esp
107b3b: 50 push %eax
107b3c: e8 77 74 00 00 call 10efb8 <rtems_deviceio_errno>
107b41: 83 c4 10 add $0x10,%esp
return args.ioctl_return;
}
107b44: c9 leave
107b45: c3 ret
00107944 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
107944: 55 push %ebp
107945: 89 e5 mov %esp,%ebp
107947: 57 push %edi
107948: 56 push %esi
107949: 53 push %ebx
10794a: 83 ec 1c sub $0x1c,%esp
10794d: 8b 7d 08 mov 0x8(%ebp),%edi
107950: 8b 4d 10 mov 0x10(%ebp),%ecx
107953: 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') &&
107956: 80 3f 64 cmpb $0x64,(%edi)
107959: 0f 84 dd 00 00 00 je 107a3c <devFS_mknod+0xf8>
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
10795f: 8b 45 0c mov 0xc(%ebp),%eax
107962: 25 00 f0 00 00 and $0xf000,%eax
107967: 3d 00 60 00 00 cmp $0x6000,%eax
10796c: 74 0b je 107979 <devFS_mknod+0x35>
10796e: 3d 00 20 00 00 cmp $0x2000,%eax
107973: 0f 85 e5 00 00 00 jne 107a5e <devFS_mknod+0x11a>
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.major;
107979: 89 4d dc mov %ecx,-0x24(%ebp)
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
10797c: 89 55 d8 mov %edx,-0x28(%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;
10797f: 8b 45 18 mov 0x18(%ebp),%eax
107982: 8b 30 mov (%eax),%esi
if (!device_name_table)
107984: 85 f6 test %esi,%esi
107986: 0f 84 f4 00 00 00 je 107a80 <devFS_mknod+0x13c>
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
10798c: 8b 15 d0 15 12 00 mov 0x1215d0,%edx
107992: 85 d2 test %edx,%edx
107994: 0f 84 d6 00 00 00 je 107a70 <devFS_mknod+0x12c>
10799a: 31 c0 xor %eax,%eax
10799c: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp)
1079a3: 31 db xor %ebx,%ebx
1079a5: 89 7d e4 mov %edi,-0x1c(%ebp)
1079a8: 89 d7 mov %edx,%edi
1079aa: eb 1a jmp 1079c6 <devFS_mknod+0x82>
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
1079ac: 83 ec 08 sub $0x8,%esp
1079af: 50 push %eax
1079b0: ff 75 e4 pushl -0x1c(%ebp)
1079b3: e8 d4 a6 00 00 call 11208c <strcmp>
1079b8: 83 c4 10 add $0x10,%esp
1079bb: 85 c0 test %eax,%eax
1079bd: 74 65 je 107a24 <devFS_mknod+0xe0>
/* 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++){
1079bf: 43 inc %ebx
1079c0: 89 d8 mov %ebx,%eax
1079c2: 39 fb cmp %edi,%ebx
1079c4: 73 16 jae 1079dc <devFS_mknod+0x98>
if (device_name_table[i].device_name == NULL)
1079c6: 8d 04 80 lea (%eax,%eax,4),%eax
1079c9: 8b 04 86 mov (%esi,%eax,4),%eax
1079cc: 85 c0 test %eax,%eax
1079ce: 75 dc jne 1079ac <devFS_mknod+0x68>
1079d0: 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++){
1079d3: 43 inc %ebx
1079d4: 89 d8 mov %ebx,%eax
1079d6: 39 fb cmp %edi,%ebx
1079d8: 72 ec jb 1079c6 <devFS_mknod+0x82>
1079da: 66 90 xchg %ax,%ax
1079dc: 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)
1079df: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp)
1079e3: 0f 84 87 00 00 00 je 107a70 <devFS_mknod+0x12c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
1079e9: 9c pushf
1079ea: fa cli
1079eb: 5b pop %ebx
device_name_table[slot].device_name = (char *)path;
1079ec: 8b 55 e0 mov -0x20(%ebp),%edx
1079ef: 8d 04 92 lea (%edx,%edx,4),%eax
1079f2: 8d 14 86 lea (%esi,%eax,4),%edx
1079f5: 89 3a mov %edi,(%edx)
device_name_table[slot].device_name_length = strlen(path);
1079f7: 31 c0 xor %eax,%eax
1079f9: b9 ff ff ff ff mov $0xffffffff,%ecx
1079fe: f2 ae repnz scas %es:(%edi),%al
107a00: f7 d1 not %ecx
107a02: 49 dec %ecx
107a03: 89 4a 04 mov %ecx,0x4(%edx)
device_name_table[slot].major = major;
107a06: 8b 45 dc mov -0x24(%ebp),%eax
107a09: 89 42 08 mov %eax,0x8(%edx)
device_name_table[slot].minor = minor;
107a0c: 8b 45 d8 mov -0x28(%ebp),%eax
107a0f: 89 42 0c mov %eax,0xc(%edx)
device_name_table[slot].mode = mode;
107a12: 8b 45 0c mov 0xc(%ebp),%eax
107a15: 89 42 10 mov %eax,0x10(%edx)
_ISR_Enable(level);
107a18: 53 push %ebx
107a19: 9d popf
return 0;
107a1a: 31 c0 xor %eax,%eax
}
107a1c: 8d 65 f4 lea -0xc(%ebp),%esp
107a1f: 5b pop %ebx
107a20: 5e pop %esi
107a21: 5f pop %edi
107a22: c9 leave
107a23: 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 );
107a24: e8 7f 9a 00 00 call 1114a8 <__errno>
107a29: c7 00 11 00 00 00 movl $0x11,(%eax)
107a2f: b8 ff ff ff ff mov $0xffffffff,%eax
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
107a34: 8d 65 f4 lea -0xc(%ebp),%esp
107a37: 5b pop %ebx
107a38: 5e pop %esi
107a39: 5f pop %edi
107a3a: c9 leave
107a3b: c3 ret
* 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') &&
107a3c: 80 7f 01 65 cmpb $0x65,0x1(%edi)
107a40: 0f 85 19 ff ff ff jne 10795f <devFS_mknod+0x1b> <== NEVER TAKEN
107a46: 80 7f 02 76 cmpb $0x76,0x2(%edi)
107a4a: 0f 85 0f ff ff ff jne 10795f <devFS_mknod+0x1b> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
107a50: 80 7f 03 00 cmpb $0x0,0x3(%edi)
107a54: 0f 85 05 ff ff ff jne 10795f <devFS_mknod+0x1b>
return 0;
107a5a: 31 c0 xor %eax,%eax
107a5c: eb be jmp 107a1c <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 );
107a5e: e8 45 9a 00 00 call 1114a8 <__errno>
107a63: c7 00 16 00 00 00 movl $0x16,(%eax)
107a69: b8 ff ff ff ff mov $0xffffffff,%eax
107a6e: eb ac jmp 107a1c <devFS_mknod+0xd8>
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 );
107a70: e8 33 9a 00 00 call 1114a8 <__errno>
107a75: c7 00 0c 00 00 00 movl $0xc,(%eax)
107a7b: 83 c8 ff or $0xffffffff,%eax
107a7e: eb 9c jmp 107a1c <devFS_mknod+0xd8>
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 );
107a80: e8 23 9a 00 00 call 1114a8 <__errno>
107a85: c7 00 0e 00 00 00 movl $0xe,(%eax)
107a8b: 83 c8 ff or $0xffffffff,%eax
107a8e: eb 8c jmp 107a1c <devFS_mknod+0xd8>
001126e4 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
1126e4: 55 push %ebp
1126e5: 89 e5 mov %esp,%ebp
1126e7: 83 ec 1c sub $0x1c,%esp
1126ea: 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;
1126ed: 89 45 e8 mov %eax,-0x18(%ebp)
args.command = command;
1126f0: 8b 55 0c mov 0xc(%ebp),%edx
1126f3: 89 55 ec mov %edx,-0x14(%ebp)
args.buffer = buffer;
1126f6: 8b 55 10 mov 0x10(%ebp),%edx
1126f9: 89 55 f0 mov %edx,-0x10(%ebp)
the_jnode = iop->pathinfo.node_access;
1126fc: 8b 40 18 mov 0x18(%eax),%eax
status = rtems_io_control(
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
1126ff: 8d 55 e8 lea -0x18(%ebp),%edx
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
112702: 52 push %edx
112703: ff 70 54 pushl 0x54(%eax)
112706: ff 70 50 pushl 0x50(%eax)
112709: e8 fa 08 00 00 call 113008 <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
11270e: 83 c4 10 add $0x10,%esp
112711: 85 c0 test %eax,%eax
112713: 75 07 jne 11271c <device_ioctl+0x38>
return rtems_deviceio_errno(status);
return args.ioctl_return;
112715: 8b 45 f4 mov -0xc(%ebp),%eax
}
112718: c9 leave
112719: c3 ret
11271a: 66 90 xchg %ax,%ax
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
11271c: 83 ec 0c sub $0xc,%esp
11271f: 50 push %eax
112720: e8 33 0b 00 00 call 113258 <rtems_deviceio_errno>
112725: 83 c4 10 add $0x10,%esp
return args.ioctl_return;
}
112728: c9 leave
112729: c3 ret
00108fec <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
108fec: 55 push %ebp
108fed: 89 e5 mov %esp,%ebp
108fef: 53 push %ebx
108ff0: 83 ec 04 sub $0x4,%esp
108ff3: 89 c3 mov %eax,%ebx
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
108ff5: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx
108ffb: 85 d2 test %edx,%edx
108ffd: 74 4d je 10904c <drainOutput+0x60>
rtems_interrupt_disable (level);
108fff: 9c pushf
109000: fa cli
109001: 58 pop %eax
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
109002: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
109008: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
10900e: 39 d1 cmp %edx,%ecx
109010: 74 38 je 10904a <drainOutput+0x5e>
109012: 66 90 xchg %ax,%ax
tty->rawOutBufState = rob_wait;
109014: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
10901b: 00 00 00
rtems_interrupt_enable (level);
10901e: 50 push %eax
10901f: 9d popf
sc = rtems_semaphore_obtain(
109020: 50 push %eax
109021: 6a 00 push $0x0
109023: 6a 00 push $0x0
109025: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10902b: e8 c8 26 00 00 call 10b6f8 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
109030: 83 c4 10 add $0x10,%esp
109033: 85 c0 test %eax,%eax
109035: 75 1a jne 109051 <drainOutput+0x65> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
109037: 9c pushf
109038: fa cli
109039: 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) {
10903a: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx
109040: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
109046: 39 d1 cmp %edx,%ecx
109048: 75 ca jne 109014 <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);
10904a: 50 push %eax
10904b: 9d popf
}
}
10904c: 8b 5d fc mov -0x4(%ebp),%ebx
10904f: c9 leave
109050: 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);
109051: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109054: 50 push %eax <== NOT EXECUTED
109055: e8 e2 2c 00 00 call 10bd3c <rtems_fatal_error_occurred><== NOT EXECUTED
00109d84 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
109d84: 55 push %ebp
109d85: 89 e5 mov %esp,%ebp
109d87: 53 push %ebx
109d88: 83 ec 24 sub $0x24,%esp
if ((tty->termios.c_lflag & ECHOCTL) &&
109d8b: f6 42 3d 02 testb $0x2,0x3d(%edx)
109d8f: 74 1b je 109dac <echo+0x28> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
109d91: 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) &&
109d94: 8b 1d 54 5b 12 00 mov 0x125b54,%ebx
109d9a: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1)
109d9f: 74 0b je 109dac <echo+0x28>
iscntrl(c) && (c != '\t') && (c != '\n')) {
109da1: 3c 09 cmp $0x9,%al
109da3: 74 07 je 109dac <echo+0x28>
109da5: 3c 0a cmp $0xa,%al
109da7: 75 13 jne 109dbc <echo+0x38>
109da9: 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);
109dac: 0f b6 c0 movzbl %al,%eax
109daf: e8 94 fe ff ff call 109c48 <oproc>
}
}
109db4: 8b 5d fc mov -0x4(%ebp),%ebx
109db7: c9 leave
109db8: c3 ret
109db9: 8d 76 00 lea 0x0(%esi),%esi
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
109dbc: c6 45 f6 5e movb $0x5e,-0xa(%ebp)
echobuf[1] = c ^ 0x40;
109dc0: 83 f0 40 xor $0x40,%eax
109dc3: 88 45 f7 mov %al,-0x9(%ebp)
rtems_termios_puts (echobuf, 2, tty);
109dc6: 53 push %ebx
109dc7: 52 push %edx
109dc8: 6a 02 push $0x2
109dca: 8d 45 f6 lea -0xa(%ebp),%eax
109dcd: 50 push %eax
109dce: 89 55 e4 mov %edx,-0x1c(%ebp)
109dd1: e8 3e fd ff ff call 109b14 <rtems_termios_puts>
tty->column += 2;
109dd6: 8b 55 e4 mov -0x1c(%ebp),%edx
109dd9: 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')) {
109ddd: 83 c4 10 add $0x10,%esp
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
}
}
109de0: 8b 5d fc mov -0x4(%ebp),%ebx
109de3: c9 leave
109de4: c3 ret
00108f84 <endgrent>:
void endgrent(void)
{
108f84: 55 push %ebp
108f85: 89 e5 mov %esp,%ebp
108f87: 83 ec 08 sub $0x8,%esp
if (group_fp != NULL)
108f8a: a1 a0 93 12 00 mov 0x1293a0,%eax
108f8f: 85 c0 test %eax,%eax
108f91: 74 0c je 108f9f <endgrent+0x1b> <== NEVER TAKEN
fclose(group_fp);
108f93: 83 ec 0c sub $0xc,%esp
108f96: 50 push %eax
108f97: e8 f0 b2 00 00 call 11428c <fclose>
108f9c: 83 c4 10 add $0x10,%esp
}
108f9f: c9 leave
108fa0: c3 ret
00108e2c <endpwent>:
void endpwent(void)
{
108e2c: 55 push %ebp
108e2d: 89 e5 mov %esp,%ebp
108e2f: 83 ec 08 sub $0x8,%esp
if (passwd_fp != NULL)
108e32: a1 88 94 12 00 mov 0x129488,%eax
108e37: 85 c0 test %eax,%eax
108e39: 74 0c je 108e47 <endpwent+0x1b> <== NEVER TAKEN
fclose(passwd_fp);
108e3b: 83 ec 0c sub $0xc,%esp
108e3e: 50 push %eax
108e3f: e8 48 b4 00 00 call 11428c <fclose>
108e44: 83 c4 10 add $0x10,%esp
}
108e47: c9 leave
108e48: c3 ret
00109de8 <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)
{
109de8: 55 push %ebp
109de9: 89 e5 mov %esp,%ebp
109deb: 57 push %edi
109dec: 56 push %esi
109ded: 53 push %ebx
109dee: 83 ec 1c sub $0x1c,%esp
109df1: 89 c3 mov %eax,%ebx
109df3: 89 d7 mov %edx,%edi
if (tty->ccount == 0)
109df5: 8b 48 20 mov 0x20(%eax),%ecx
109df8: 85 c9 test %ecx,%ecx
109dfa: 0f 84 84 00 00 00 je 109e84 <erase+0x9c>
return;
if (lineFlag) {
109e00: 85 d2 test %edx,%edx
109e02: 0f 85 84 00 00 00 jne 109e8c <erase+0xa4>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
109e08: 8b 50 3c mov 0x3c(%eax),%edx
109e0b: 89 7d e4 mov %edi,-0x1c(%ebp)
109e0e: eb 1d jmp 109e2d <erase+0x45>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
109e10: 80 e6 02 and $0x2,%dh <== NOT EXECUTED
109e13: 0f 85 37 01 00 00 jne 109f50 <erase+0x168> <== NOT EXECUTED
109e19: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
109e1c: 8b 75 e4 mov -0x1c(%ebp),%esi
109e1f: 85 f6 test %esi,%esi
109e21: 74 61 je 109e84 <erase+0x9c> <== NEVER TAKEN
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
109e23: 8b 4b 20 mov 0x20(%ebx),%ecx
109e26: 85 c9 test %ecx,%ecx
109e28: 74 5a je 109e84 <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);
109e2a: 8b 53 3c mov 0x3c(%ebx),%edx
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
109e2d: 8b 7b 1c mov 0x1c(%ebx),%edi
109e30: 49 dec %ecx
109e31: 89 4b 20 mov %ecx,0x20(%ebx)
109e34: 8a 04 0f mov (%edi,%ecx,1),%al
if (tty->termios.c_lflag & ECHO) {
109e37: f6 c2 08 test $0x8,%dl
109e3a: 74 e0 je 109e1c <erase+0x34> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
109e3c: 8b 75 e4 mov -0x1c(%ebp),%esi
109e3f: 85 f6 test %esi,%esi
109e41: 75 09 jne 109e4c <erase+0x64>
109e43: f6 c2 10 test $0x10,%dl
109e46: 0f 84 f0 00 00 00 je 109f3c <erase+0x154> <== NEVER TAKEN
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
109e4c: 3c 09 cmp $0x9,%al
109e4e: 74 58 je 109ea8 <erase+0xc0>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
109e50: 0f b6 c0 movzbl %al,%eax
109e53: 8d 70 01 lea 0x1(%eax),%esi
109e56: a1 54 5b 12 00 mov 0x125b54,%eax
109e5b: f6 04 30 20 testb $0x20,(%eax,%esi,1)
109e5f: 75 af jne 109e10 <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);
109e61: 57 push %edi
109e62: 53 push %ebx
109e63: 6a 03 push $0x3
109e65: 68 c6 14 12 00 push $0x1214c6
109e6a: e8 a5 fc ff ff call 109b14 <rtems_termios_puts>
if (tty->column)
109e6f: 8b 43 28 mov 0x28(%ebx),%eax
109e72: 83 c4 10 add $0x10,%esp
109e75: 85 c0 test %eax,%eax
109e77: 74 a3 je 109e1c <erase+0x34> <== NEVER TAKEN
tty->column--;
109e79: 48 dec %eax
109e7a: 89 43 28 mov %eax,0x28(%ebx)
}
}
}
if (!lineFlag)
109e7d: 8b 75 e4 mov -0x1c(%ebp),%esi
109e80: 85 f6 test %esi,%esi
109e82: 75 9f jne 109e23 <erase+0x3b>
break;
}
}
109e84: 8d 65 f4 lea -0xc(%ebp),%esp
109e87: 5b pop %ebx
109e88: 5e pop %esi
109e89: 5f pop %edi
109e8a: c9 leave
109e8b: c3 ret
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
109e8c: 8b 50 3c mov 0x3c(%eax),%edx
109e8f: f6 c2 08 test $0x8,%dl
109e92: 0f 84 94 00 00 00 je 109f2c <erase+0x144> <== NEVER TAKEN
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
109e98: f6 c2 10 test $0x10,%dl
109e9b: 0f 84 eb 00 00 00 je 109f8c <erase+0x1a4> <== NEVER TAKEN
109ea1: 89 7d e4 mov %edi,-0x1c(%ebp)
109ea4: eb 87 jmp 109e2d <erase+0x45>
109ea6: 66 90 xchg %ax,%ax
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;
109ea8: 8b 73 2c mov 0x2c(%ebx),%esi
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
109eab: 85 c9 test %ecx,%ecx
109ead: 74 46 je 109ef5 <erase+0x10d>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
109eaf: a1 54 5b 12 00 mov 0x125b54,%eax
109eb4: 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;
109eb7: 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)
109eb9: 81 e2 00 02 00 00 and $0x200,%edx
109ebf: 89 55 e0 mov %edx,-0x20(%ebp)
109ec2: 89 5d d8 mov %ebx,-0x28(%ebp)
109ec5: 8b 5d dc mov -0x24(%ebp),%ebx
109ec8: eb 10 jmp 109eda <erase+0xf2>
109eca: 66 90 xchg %ax,%ax
109ecc: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED
109ecf: 85 d2 test %edx,%edx <== NOT EXECUTED
109ed1: 74 03 je 109ed6 <erase+0xee> <== NOT EXECUTED
col += 2;
109ed3: 83 c6 02 add $0x2,%esi <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
109ed6: 39 c1 cmp %eax,%ecx
109ed8: 74 18 je 109ef2 <erase+0x10a> <== NEVER TAKEN
c = tty->cbuf[i++];
109eda: 8a 14 07 mov (%edi,%eax,1),%dl
109edd: 40 inc %eax
if (c == '\t') {
109ede: 80 fa 09 cmp $0x9,%dl
109ee1: 74 41 je 109f24 <erase+0x13c>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
109ee3: 0f b6 d2 movzbl %dl,%edx
109ee6: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1)
109eeb: 75 df jne 109ecc <erase+0xe4> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
} else {
col++;
109eed: 46 inc %esi
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
109eee: 39 c1 cmp %eax,%ecx
109ef0: 75 e8 jne 109eda <erase+0xf2>
109ef2: 8b 5d d8 mov -0x28(%ebp),%ebx
}
/*
* Back up over the tab
*/
while (tty->column > col) {
109ef5: 3b 73 28 cmp 0x28(%ebx),%esi
109ef8: 0f 8d 1e ff ff ff jge 109e1c <erase+0x34> <== NEVER TAKEN
109efe: 66 90 xchg %ax,%ax
rtems_termios_puts ("\b", 1, tty);
109f00: 52 push %edx
109f01: 53 push %ebx
109f02: 6a 01 push $0x1
109f04: 68 c8 14 12 00 push $0x1214c8
109f09: e8 06 fc ff ff call 109b14 <rtems_termios_puts>
tty->column--;
109f0e: 8b 43 28 mov 0x28(%ebx),%eax
109f11: 48 dec %eax
109f12: 89 43 28 mov %eax,0x28(%ebx)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
109f15: 83 c4 10 add $0x10,%esp
109f18: 39 f0 cmp %esi,%eax
109f1a: 7f e4 jg 109f00 <erase+0x118>
109f1c: e9 fb fe ff ff jmp 109e1c <erase+0x34>
109f21: 8d 76 00 lea 0x0(%esi),%esi
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
109f24: 83 ce 07 or $0x7,%esi
109f27: 46 inc %esi
109f28: eb ac jmp 109ed6 <erase+0xee>
109f2a: 66 90 xchg %ax,%ax
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
109f2c: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
109f33: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
109f36: 5b pop %ebx <== NOT EXECUTED
109f37: 5e pop %esi <== NOT EXECUTED
109f38: 5f pop %edi <== NOT EXECUTED
109f39: c9 leave <== NOT EXECUTED
109f3a: c3 ret <== NOT EXECUTED
109f3b: 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);
109f3c: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED
109f40: 89 da mov %ebx,%edx <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
109f42: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
109f45: 5b pop %ebx <== NOT EXECUTED
109f46: 5e pop %esi <== NOT EXECUTED
109f47: 5f pop %edi <== NOT EXECUTED
109f48: 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);
109f49: e9 36 fe ff ff jmp 109d84 <echo> <== NOT EXECUTED
109f4e: 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);
109f50: 50 push %eax <== NOT EXECUTED
109f51: 53 push %ebx <== NOT EXECUTED
109f52: 6a 03 push $0x3 <== NOT EXECUTED
109f54: 68 c6 14 12 00 push $0x1214c6 <== NOT EXECUTED
109f59: e8 b6 fb ff ff call 109b14 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
109f5e: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED
109f61: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109f64: 85 c0 test %eax,%eax <== NOT EXECUTED
109f66: 74 04 je 109f6c <erase+0x184> <== NOT EXECUTED
tty->column--;
109f68: 48 dec %eax <== NOT EXECUTED
109f69: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
109f6c: a1 54 5b 12 00 mov 0x125b54,%eax <== NOT EXECUTED
109f71: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED
109f75: 0f 84 e6 fe ff ff je 109e61 <erase+0x79> <== NOT EXECUTED
109f7b: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED
109f7f: 0f 85 dc fe ff ff jne 109e61 <erase+0x79> <== NOT EXECUTED
109f85: e9 92 fe ff ff jmp 109e1c <erase+0x34> <== NOT EXECUTED
109f8a: 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;
109f8c: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
109f93: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED
109f97: 89 da mov %ebx,%edx <== NOT EXECUTED
109f99: e8 e6 fd ff ff call 109d84 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
109f9e: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED
109fa2: 0f 84 dc fe ff ff je 109e84 <erase+0x9c> <== NOT EXECUTED
echo ('\n', tty);
109fa8: 89 da mov %ebx,%edx <== NOT EXECUTED
109faa: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
109faf: eb 91 jmp 109f42 <erase+0x15a> <== NOT EXECUTED
00108b50 <fchdir>:
#include <rtems/seterr.h>
int fchdir(
int fd
)
{
108b50: 55 push %ebp
108b51: 89 e5 mov %esp,%ebp
108b53: 57 push %edi
108b54: 56 push %esi
108b55: 53 push %ebx
108b56: 83 ec 4c sub $0x4c,%esp
108b59: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
108b5c: 3b 05 6c 4e 12 00 cmp 0x124e6c,%eax
108b62: 0f 83 d0 00 00 00 jae 108c38 <fchdir+0xe8>
iop = rtems_libio_iop( fd );
108b68: c1 e0 03 shl $0x3,%eax
108b6b: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
108b72: 29 c3 sub %eax,%ebx
108b74: 03 1d 20 91 12 00 add 0x129120,%ebx
rtems_libio_check_is_open(iop);
108b7a: 8b 43 14 mov 0x14(%ebx),%eax
108b7d: f6 c4 01 test $0x1,%ah
108b80: 0f 84 b2 00 00 00 je 108c38 <fchdir+0xe8>
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
108b86: a8 02 test $0x2,%al
108b88: 0f 84 be 00 00 00 je 108c4c <fchdir+0xfc>
/*
* Verify you can change directory into this node.
*/
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
108b8e: 83 ec 0c sub $0xc,%esp
108b91: 8b 43 24 mov 0x24(%ebx),%eax
108b94: 83 c3 18 add $0x18,%ebx
108b97: 53 push %ebx
108b98: ff 50 10 call *0x10(%eax)
108b9b: 83 c4 10 add $0x10,%esp
108b9e: 48 dec %eax
108b9f: 75 67 jne 108c08 <fchdir+0xb8>
* but note the race condition. Threads who
* share their rtems_filesystem_current better
* be synchronized!
*/
saved = rtems_filesystem_current;
108ba1: a1 90 6e 12 00 mov 0x126e90,%eax
108ba6: 8d 55 c0 lea -0x40(%ebp),%edx
108ba9: 89 55 b4 mov %edx,-0x4c(%ebp)
108bac: 8d 70 04 lea 0x4(%eax),%esi
108baf: b9 05 00 00 00 mov $0x5,%ecx
108bb4: 89 d7 mov %edx,%edi
108bb6: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_filesystem_current = iop->pathinfo;
108bb8: 8d 78 04 lea 0x4(%eax),%edi
108bbb: b1 05 mov $0x5,%cl
108bbd: 89 de mov %ebx,%esi
108bbf: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
108bc1: 83 ec 0c sub $0xc,%esp
108bc4: 6a 00 push $0x0
108bc6: 8d 75 d4 lea -0x2c(%ebp),%esi
108bc9: 56 push %esi
108bca: 6a 00 push $0x0
108bcc: 6a 01 push $0x1
108bce: 68 96 2d 12 00 push $0x122d96
108bd3: e8 a0 fe ff ff call 108a78 <rtems_filesystem_evaluate_path>
108bd8: 83 c4 20 add $0x20,%esp
108bdb: 85 c0 test %eax,%eax
108bdd: 75 3d jne 108c1c <fchdir+0xcc>
/* cloning failed; restore original and bail out */
rtems_filesystem_current = saved;
return -1;
}
/* release the old one */
rtems_filesystem_freenode( &saved );
108bdf: 83 ec 0c sub $0xc,%esp
108be2: 8d 45 c0 lea -0x40(%ebp),%eax
108be5: 50 push %eax
108be6: e8 61 01 00 00 call 108d4c <rtems_filesystem_freenode>
rtems_filesystem_current = loc;
108beb: 8b 3d 90 6e 12 00 mov 0x126e90,%edi
108bf1: 83 c7 04 add $0x4,%edi
108bf4: b9 05 00 00 00 mov $0x5,%ecx
108bf9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
108bfb: 83 c4 10 add $0x10,%esp
108bfe: 31 c0 xor %eax,%eax
}
108c00: 8d 65 f4 lea -0xc(%ebp),%esp
108c03: 5b pop %ebx
108c04: 5e pop %esi
108c05: 5f pop %edi
108c06: c9 leave
108c07: 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 );
108c08: e8 87 b5 00 00 call 114194 <__errno>
108c0d: c7 00 14 00 00 00 movl $0x14,(%eax)
108c13: b8 ff ff ff ff mov $0xffffffff,%eax
108c18: eb e6 jmp 108c00 <fchdir+0xb0>
108c1a: 66 90 xchg %ax,%ax
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;
108c1c: 8b 3d 90 6e 12 00 mov 0x126e90,%edi
108c22: 83 c7 04 add $0x4,%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)
return -1;
108c2f: b8 ff ff ff ff mov $0xffffffff,%eax
108c34: eb ca jmp 108c00 <fchdir+0xb0>
108c36: 66 90 xchg %ax,%ax
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);
108c38: e8 57 b5 00 00 call 114194 <__errno>
108c3d: c7 00 09 00 00 00 movl $0x9,(%eax)
108c43: b8 ff ff ff ff mov $0xffffffff,%eax
108c48: eb b6 jmp 108c00 <fchdir+0xb0>
108c4a: 66 90 xchg %ax,%ax
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
108c4c: e8 43 b5 00 00 call 114194 <__errno>
108c51: c7 00 16 00 00 00 movl $0x16,(%eax)
108c57: b8 ff ff ff ff mov $0xffffffff,%eax
108c5c: eb a2 jmp 108c00 <fchdir+0xb0>
00108c60 <fchmod>:
int fchmod(
int fd,
mode_t mode
)
{
108c60: 55 push %ebp
108c61: 89 e5 mov %esp,%ebp
108c63: 83 ec 08 sub $0x8,%esp
108c66: 8b 45 08 mov 0x8(%ebp),%eax
108c69: 8b 4d 0c mov 0xc(%ebp),%ecx
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
108c6c: 3b 05 6c 4e 12 00 cmp 0x124e6c,%eax
108c72: 73 38 jae 108cac <fchmod+0x4c>
iop = rtems_libio_iop( fd );
108c74: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
108c7b: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax
108c82: 29 d0 sub %edx,%eax
108c84: 03 05 20 91 12 00 add 0x129120,%eax
rtems_libio_check_is_open(iop);
108c8a: 8b 50 14 mov 0x14(%eax),%edx
108c8d: f6 c6 01 test $0x1,%dh
108c90: 74 1a je 108cac <fchmod+0x4c>
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108c92: 83 e2 04 and $0x4,%edx
108c95: 74 29 je 108cc0 <fchmod+0x60>
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
108c97: 8b 50 20 mov 0x20(%eax),%edx
108c9a: 89 4d 0c mov %ecx,0xc(%ebp)
108c9d: 83 c0 18 add $0x18,%eax
108ca0: 89 45 08 mov %eax,0x8(%ebp)
108ca3: 8b 42 1c mov 0x1c(%edx),%eax
}
108ca6: c9 leave
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
108ca7: ff e0 jmp *%eax
108ca9: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108cac: e8 e3 b4 00 00 call 114194 <__errno>
108cb1: 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 );
}
108cb7: b8 ff ff ff ff mov $0xffffffff,%eax
108cbc: c9 leave
108cbd: c3 ret
108cbe: 66 90 xchg %ax,%ax
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108cc0: e8 cf b4 00 00 call 114194 <__errno>
108cc5: c7 00 16 00 00 00 movl $0x16,(%eax)
108ccb: eb ea jmp 108cb7 <fchmod+0x57>
00108b00 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
108b00: 55 push %ebp
108b01: 89 e5 mov %esp,%ebp
108b03: 57 push %edi
108b04: 56 push %esi
108b05: 53 push %ebx
108b06: 83 ec 1c sub $0x1c,%esp
108b09: 8b 5d 08 mov 0x8(%ebp),%ebx
108b0c: 8b 55 0c mov 0xc(%ebp),%edx
int ret;
va_list ap;
va_start( ap, cmd );
108b0f: 8d 7d 10 lea 0x10(%ebp),%edi
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
108b12: 8b 0d 6c 56 12 00 mov 0x12566c,%ecx
108b18: 39 cb cmp %ecx,%ebx
108b1a: 0f 83 5c 01 00 00 jae 108c7c <fcntl+0x17c>
iop = rtems_libio_iop( fd );
108b20: a1 20 99 12 00 mov 0x129920,%eax
108b25: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi
108b2c: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx
108b33: 29 f3 sub %esi,%ebx
108b35: 8d 1c 18 lea (%eax,%ebx,1),%ebx
rtems_libio_check_is_open(iop);
108b38: 8b 73 14 mov 0x14(%ebx),%esi
108b3b: f7 c6 00 01 00 00 test $0x100,%esi
108b41: 0f 84 35 01 00 00 je 108c7c <fcntl+0x17c>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
108b47: 83 fa 09 cmp $0x9,%edx
108b4a: 76 10 jbe 108b5c <fcntl+0x5c>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
108b4c: e8 f3 b8 00 00 call 114444 <__errno>
108b51: c7 00 16 00 00 00 movl $0x16,(%eax)
108b57: eb 16 jmp 108b6f <fcntl+0x6f>
108b59: 8d 76 00 lea 0x0(%esi),%esi
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
108b5c: ff 24 95 b0 2f 12 00 jmp *0x122fb0(,%edx,4)
108b63: 90 nop
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
108b64: e8 db b8 00 00 call 114444 <__errno>
108b69: 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;
108b6f: 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;
}
108b74: 89 f0 mov %esi,%eax
108b76: 8d 65 f4 lea -0xc(%ebp),%esp
108b79: 5b pop %ebx
108b7a: 5e pop %esi
108b7b: 5f pop %edi
108b7c: c9 leave
108b7d: c3 ret
108b7e: 66 90 xchg %ax,%ax
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
108b80: 83 ec 0c sub $0xc,%esp
108b83: ff 37 pushl (%edi)
108b85: 89 55 e0 mov %edx,-0x20(%ebp)
108b88: e8 33 05 00 00 call 1090c0 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
108b8d: 25 01 02 00 00 and $0x201,%eax
108b92: 8b 4b 14 mov 0x14(%ebx),%ecx
108b95: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx
108b9b: 09 c8 or %ecx,%eax
108b9d: 89 43 14 mov %eax,0x14(%ebx)
108ba0: 83 c4 10 add $0x10,%esp
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
108ba3: 31 f6 xor %esi,%esi
108ba5: 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 );
108ba8: 83 ec 08 sub $0x8,%esp
108bab: 8b 43 20 mov 0x20(%ebx),%eax
108bae: 53 push %ebx
108baf: 52 push %edx
108bb0: ff 50 30 call *0x30(%eax)
108bb3: 89 c3 mov %eax,%ebx
if (err) {
108bb5: 83 c4 10 add $0x10,%esp
108bb8: 85 c0 test %eax,%eax
108bba: 74 b8 je 108b74 <fcntl+0x74> <== ALWAYS TAKEN
errno = err;
108bbc: e8 83 b8 00 00 call 114444 <__errno> <== NOT EXECUTED
108bc1: 89 18 mov %ebx,(%eax) <== NOT EXECUTED
108bc3: eb aa jmp 108b6f <fcntl+0x6f> <== NOT EXECUTED
108bc5: 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 );
108bc8: 83 ec 0c sub $0xc,%esp
108bcb: 56 push %esi
108bcc: 89 55 e0 mov %edx,-0x20(%ebp)
108bcf: e8 24 05 00 00 call 1090f8 <rtems_libio_to_fcntl_flags>
108bd4: 89 c6 mov %eax,%esi
108bd6: 83 c4 10 add $0x10,%esp
108bd9: 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) {
108bdc: 85 f6 test %esi,%esi
108bde: 79 c8 jns 108ba8 <fcntl+0xa8> <== ALWAYS TAKEN
108be0: eb 92 jmp 108b74 <fcntl+0x74> <== NOT EXECUTED
108be2: 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 ) )
108be4: 8b 07 mov (%edi),%eax
108be6: 85 c0 test %eax,%eax
108be8: 74 6a je 108c54 <fcntl+0x154>
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
108bea: 81 ce 00 08 00 00 or $0x800,%esi
108bf0: 89 73 14 mov %esi,0x14(%ebx)
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
108bf3: 31 f6 xor %esi,%esi
108bf5: eb b1 jmp 108ba8 <fcntl+0xa8>
108bf7: 90 nop
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
108bf8: 31 c0 xor %eax,%eax
108bfa: f7 c6 00 08 00 00 test $0x800,%esi
108c00: 0f 95 c0 setne %al
108c03: 89 c6 mov %eax,%esi
108c05: eb a1 jmp 108ba8 <fcntl+0xa8>
108c07: 90 nop
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
108c08: 8b 3f mov (%edi),%edi
if ( fd2 )
108c0a: 85 ff test %edi,%edi
108c0c: 0f 84 82 00 00 00 je 108c94 <fcntl+0x194>
diop = rtems_libio_iop( fd2 );
108c12: 39 f9 cmp %edi,%ecx
108c14: 77 4e ja 108c64 <fcntl+0x164> <== ALWAYS TAKEN
108c16: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED
108c1d: 31 ff xor %edi,%edi <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
108c1f: 89 77 14 mov %esi,0x14(%edi)
diop->pathinfo = iop->pathinfo;
108c22: 83 c7 18 add $0x18,%edi
108c25: 8d 73 18 lea 0x18(%ebx),%esi
108c28: b9 05 00 00 00 mov $0x5,%ecx
108c2d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ret = (int) (diop - rtems_libio_iops);
108c2f: 8b 4d e4 mov -0x1c(%ebp),%ecx
108c32: 29 c1 sub %eax,%ecx
108c34: 89 c8 mov %ecx,%eax
108c36: c1 f8 03 sar $0x3,%eax
108c39: 8d 0c c0 lea (%eax,%eax,8),%ecx
108c3c: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108c3f: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108c42: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108c45: 89 ce mov %ecx,%esi
108c47: c1 e6 0f shl $0xf,%esi
108c4a: 01 f1 add %esi,%ecx
108c4c: 8d 34 c8 lea (%eax,%ecx,8),%esi
108c4f: f7 de neg %esi
108c51: eb 89 jmp 108bdc <fcntl+0xdc>
108c53: 90 nop
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
108c54: 81 e6 ff f7 ff ff and $0xfffff7ff,%esi
108c5a: 89 73 14 mov %esi,0x14(%ebx)
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
108c5d: 31 f6 xor %esi,%esi
108c5f: e9 44 ff ff ff jmp 108ba8 <fcntl+0xa8>
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
108c64: 8d 0c fd 00 00 00 00 lea 0x0(,%edi,8),%ecx
108c6b: 8d 3c cd 00 00 00 00 lea 0x0(,%ecx,8),%edi
108c72: 29 cf sub %ecx,%edi
108c74: 8d 3c 38 lea (%eax,%edi,1),%edi
108c77: 89 7d e4 mov %edi,-0x1c(%ebp)
108c7a: eb a3 jmp 108c1f <fcntl+0x11f>
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108c7c: e8 c3 b7 00 00 call 114444 <__errno>
108c81: c7 00 09 00 00 00 movl $0x9,(%eax)
108c87: be ff ff ff ff mov $0xffffffff,%esi
108c8c: e9 e3 fe ff ff jmp 108b74 <fcntl+0x74>
108c91: 8d 76 00 lea 0x0(%esi),%esi
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
108c94: 89 55 e0 mov %edx,-0x20(%ebp)
108c97: e8 a0 04 00 00 call 10913c <rtems_libio_allocate>
108c9c: 89 c7 mov %eax,%edi
if ( diop == 0 ) {
108c9e: 85 c0 test %eax,%eax
108ca0: 8b 55 e0 mov -0x20(%ebp),%edx
108ca3: 0f 84 c6 fe ff ff je 108b6f <fcntl+0x6f> <== NEVER TAKEN
108ca9: 8b 73 14 mov 0x14(%ebx),%esi
108cac: 89 45 e4 mov %eax,-0x1c(%ebp)
108caf: a1 20 99 12 00 mov 0x129920,%eax
108cb4: e9 66 ff ff ff jmp 108c1f <fcntl+0x11f>
00108cdc <fdatasync>:
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
108cdc: 55 push %ebp
108cdd: 89 e5 mov %esp,%ebp
108cdf: 83 ec 08 sub $0x8,%esp
108ce2: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
108ce5: 3b 05 6c 56 12 00 cmp 0x12566c,%eax
108ceb: 73 2f jae 108d1c <fdatasync+0x40>
iop = rtems_libio_iop( fd );
108ced: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
108cf4: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax
108cfb: 29 d0 sub %edx,%eax
108cfd: 03 05 20 99 12 00 add 0x129920,%eax
rtems_libio_check_is_open(iop);
108d03: 8b 50 14 mov 0x14(%eax),%edx
108d06: f6 c6 01 test $0x1,%dh
108d09: 74 11 je 108d1c <fdatasync+0x40>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108d0b: 83 e2 04 and $0x4,%edx
108d0e: 74 20 je 108d30 <fdatasync+0x54>
/*
* Now process the fdatasync().
*/
return (*iop->pathinfo.handlers->fdatasync_h)( iop );
108d10: 8b 50 20 mov 0x20(%eax),%edx
108d13: 89 45 08 mov %eax,0x8(%ebp)
108d16: 8b 42 2c mov 0x2c(%edx),%eax
}
108d19: c9 leave
/*
* Now process the fdatasync().
*/
return (*iop->pathinfo.handlers->fdatasync_h)( iop );
108d1a: ff e0 jmp *%eax
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108d1c: e8 23 b7 00 00 call 114444 <__errno>
108d21: c7 00 09 00 00 00 movl $0x9,(%eax)
/*
* Now process the fdatasync().
*/
return (*iop->pathinfo.handlers->fdatasync_h)( iop );
}
108d27: b8 ff ff ff ff mov $0xffffffff,%eax
108d2c: c9 leave
108d2d: c3 ret
108d2e: 66 90 xchg %ax,%ax
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 );
108d30: e8 0f b7 00 00 call 114444 <__errno>
108d35: c7 00 16 00 00 00 movl $0x16,(%eax)
108d3b: eb ea jmp 108d27 <fdatasync+0x4b>
00111af0 <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
111af0: 55 push %ebp
111af1: 89 e5 mov %esp,%ebp
111af3: 57 push %edi
111af4: 56 push %esi
111af5: 53 push %ebx
111af6: 83 ec 2c sub $0x2c,%esp
111af9: 8b 75 08 mov 0x8(%ebp),%esi
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
111afc: a1 ac a4 12 00 mov 0x12a4ac,%eax
111b01: 85 c0 test %eax,%eax
111b03: 0f 84 8b 00 00 00 je 111b94 <fifo_open+0xa4>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
111b09: 53 push %ebx
111b0a: 6a 00 push $0x0
111b0c: 6a 00 push $0x0
111b0e: 50 push %eax
111b0f: e8 08 ba ff ff call 10d51c <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
111b14: 83 c4 10 add $0x10,%esp
111b17: 85 c0 test %eax,%eax
111b19: 0f 85 4c 03 00 00 jne 111e6b <fifo_open+0x37b> <== NEVER TAKEN
err = pipe_lock();
if (err)
return err;
pipe = *pipep;
111b1f: 8b 1e mov (%esi),%ebx
if (pipe == NULL) {
111b21: 85 db test %ebx,%ebx
111b23: 0f 84 df 01 00 00 je 111d08 <fifo_open+0x218>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
111b29: 52 push %edx
111b2a: 6a 00 push $0x0
111b2c: 6a 00 push $0x0
111b2e: ff 73 28 pushl 0x28(%ebx)
111b31: e8 e6 b9 ff ff call 10d51c <rtems_semaphore_obtain>
111b36: 83 c4 10 add $0x10,%esp
111b39: 83 f8 01 cmp $0x1,%eax
111b3c: 19 ff sbb %edi,%edi
111b3e: f7 d7 not %edi
111b40: 83 e7 fc and $0xfffffffc,%edi
err = -EINTR;
if (*pipep == NULL) {
111b43: 8b 06 mov (%esi),%eax
111b45: 85 c0 test %eax,%eax
111b47: 0f 84 d7 02 00 00 je 111e24 <fifo_open+0x334>
else
*pipep = pipe;
}
out:
pipe_unlock();
111b4d: e8 aa fe ff ff call 1119fc <pipe_unlock>
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
111b52: 85 ff test %edi,%edi
111b54: 75 32 jne 111b88 <fifo_open+0x98> <== NEVER TAKEN
return err;
pipe = *pipep;
111b56: 8b 1e mov (%esi),%ebx
switch (LIBIO_ACCMODE(iop)) {
111b58: 8b 55 0c mov 0xc(%ebp),%edx
111b5b: 8b 42 14 mov 0x14(%edx),%eax
111b5e: 83 e0 06 and $0x6,%eax
111b61: 83 f8 04 cmp $0x4,%eax
111b64: 74 6a je 111bd0 <fifo_open+0xe0>
111b66: 83 f8 06 cmp $0x6,%eax
111b69: 0f 84 59 01 00 00 je 111cc8 <fifo_open+0x1d8>
111b6f: 83 f8 02 cmp $0x2,%eax
111b72: 0f 84 dc 00 00 00 je 111c54 <fifo_open+0x164> <== ALWAYS TAKEN
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
111b78: 83 ec 0c sub $0xc,%esp
111b7b: ff 73 28 pushl 0x28(%ebx)
111b7e: e8 95 ba ff ff call 10d618 <rtems_semaphore_release>
return 0;
111b83: 83 c4 10 add $0x10,%esp
111b86: 31 ff xor %edi,%edi
out_error:
pipe_release(pipep, iop);
return err;
}
111b88: 89 f8 mov %edi,%eax
111b8a: 8d 65 f4 lea -0xc(%ebp),%esp
111b8d: 5b pop %ebx
111b8e: 5e pop %esi
111b8f: 5f pop %edi
111b90: c9 leave
111b91: c3 ret
111b92: 66 90 xchg %ax,%ax
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 );
111b94: 50 push %eax
111b95: 6a 00 push $0x0
111b97: 6a 00 push $0x0
111b99: ff 35 c8 a6 12 00 pushl 0x12a6c8
111b9f: e8 78 b9 ff ff call 10d51c <rtems_semaphore_obtain>
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
111ba4: 83 c4 10 add $0x10,%esp
111ba7: 8b 3d ac a4 12 00 mov 0x12a4ac,%edi
111bad: 85 ff test %edi,%edi
111baf: 0f 84 83 02 00 00 je 111e38 <fifo_open+0x348> <== ALWAYS TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
111bb5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111bb8: ff 35 c8 a6 12 00 pushl 0x12a6c8 <== NOT EXECUTED
111bbe: e8 55 ba ff ff call 10d618 <rtems_semaphore_release><== NOT EXECUTED
111bc3: a1 ac a4 12 00 mov 0x12a4ac,%eax <== NOT EXECUTED
111bc8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
111bcb: e9 39 ff ff ff jmp 111b09 <fifo_open+0x19> <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
111bd0: ff 43 24 incl 0x24(%ebx)
if (pipe->Writers ++ == 0)
111bd3: 8b 43 14 mov 0x14(%ebx),%eax
111bd6: 8d 50 01 lea 0x1(%eax),%edx
111bd9: 89 53 14 mov %edx,0x14(%ebx)
111bdc: 85 c0 test %eax,%eax
111bde: 0f 84 c4 02 00 00 je 111ea8 <fifo_open+0x3b8> <== ALWAYS TAKEN
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
111be4: 8b 4b 10 mov 0x10(%ebx),%ecx
111be7: 85 c9 test %ecx,%ecx
111be9: 75 8d jne 111b78 <fifo_open+0x88>
111beb: 8b 55 0c mov 0xc(%ebp),%edx
111bee: f6 42 14 01 testb $0x1,0x14(%edx)
111bf2: 0f 85 04 03 00 00 jne 111efc <fifo_open+0x40c>
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
111bf8: 8b 7b 20 mov 0x20(%ebx),%edi
111bfb: eb 20 jmp 111c1d <fifo_open+0x12d>
111bfd: 8d 76 00 lea 0x0(%esi),%esi
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
111c00: 51 push %ecx
111c01: 6a 00 push $0x0
111c03: 6a 00 push $0x0
111c05: ff 73 28 pushl 0x28(%ebx)
111c08: e8 0f b9 ff ff call 10d51c <rtems_semaphore_obtain>
111c0d: 83 c4 10 add $0x10,%esp
111c10: 85 c0 test %eax,%eax
111c12: 75 27 jne 111c3b <fifo_open+0x14b> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->readerCounter);
111c14: 39 7b 20 cmp %edi,0x20(%ebx)
111c17: 0f 85 5b ff ff ff jne 111b78 <fifo_open+0x88> <== ALWAYS TAKEN
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
111c1d: 83 ec 0c sub $0xc,%esp
111c20: ff 73 28 pushl 0x28(%ebx)
111c23: e8 f0 b9 ff ff call 10d618 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
111c28: 58 pop %eax
111c29: 5a pop %edx
111c2a: 6a 00 push $0x0
111c2c: ff 73 30 pushl 0x30(%ebx)
111c2f: e8 b0 1c 00 00 call 1138e4 <rtems_barrier_wait>
111c34: 83 c4 10 add $0x10,%esp
111c37: 85 c0 test %eax,%eax
111c39: 74 c5 je 111c00 <fifo_open+0x110> <== ALWAYS TAKEN
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
111c3b: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
111c40: 83 ec 08 sub $0x8,%esp
111c43: ff 75 0c pushl 0xc(%ebp)
111c46: 56 push %esi
111c47: e8 c8 fd ff ff call 111a14 <pipe_release>
return err;
111c4c: 83 c4 10 add $0x10,%esp
111c4f: e9 34 ff ff ff jmp 111b88 <fifo_open+0x98>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
111c54: ff 43 20 incl 0x20(%ebx)
if (pipe->Readers ++ == 0)
111c57: 8b 43 10 mov 0x10(%ebx),%eax
111c5a: 8d 50 01 lea 0x1(%eax),%edx
111c5d: 89 53 10 mov %edx,0x10(%ebx)
111c60: 85 c0 test %eax,%eax
111c62: 0f 84 10 02 00 00 je 111e78 <fifo_open+0x388> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
111c68: 8b 7b 14 mov 0x14(%ebx),%edi
111c6b: 85 ff test %edi,%edi
111c6d: 0f 85 05 ff ff ff jne 111b78 <fifo_open+0x88>
/* Not an error */
if (LIBIO_NODELAY(iop))
111c73: 8b 45 0c mov 0xc(%ebp),%eax
111c76: f6 40 14 01 testb $0x1,0x14(%eax)
111c7a: 0f 85 f8 fe ff ff jne 111b78 <fifo_open+0x88>
break;
prevCounter = pipe->writerCounter;
111c80: 8b 7b 24 mov 0x24(%ebx),%edi
111c83: eb 20 jmp 111ca5 <fifo_open+0x1b5>
111c85: 8d 76 00 lea 0x0(%esi),%esi
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
111c88: 50 push %eax
111c89: 6a 00 push $0x0
111c8b: 6a 00 push $0x0
111c8d: ff 73 28 pushl 0x28(%ebx)
111c90: e8 87 b8 ff ff call 10d51c <rtems_semaphore_obtain>
111c95: 83 c4 10 add $0x10,%esp
111c98: 85 c0 test %eax,%eax
111c9a: 75 9f jne 111c3b <fifo_open+0x14b> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->writerCounter);
111c9c: 39 7b 24 cmp %edi,0x24(%ebx)
111c9f: 0f 85 d3 fe ff ff jne 111b78 <fifo_open+0x88> <== ALWAYS TAKEN
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
111ca5: 83 ec 0c sub $0xc,%esp
111ca8: ff 73 28 pushl 0x28(%ebx)
111cab: e8 68 b9 ff ff call 10d618 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
111cb0: 5a pop %edx
111cb1: 59 pop %ecx
111cb2: 6a 00 push $0x0
111cb4: ff 73 2c pushl 0x2c(%ebx)
111cb7: e8 28 1c 00 00 call 1138e4 <rtems_barrier_wait>
111cbc: 83 c4 10 add $0x10,%esp
111cbf: 85 c0 test %eax,%eax
111cc1: 74 c5 je 111c88 <fifo_open+0x198> <== ALWAYS TAKEN
111cc3: e9 73 ff ff ff jmp 111c3b <fifo_open+0x14b> <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
111cc8: ff 43 20 incl 0x20(%ebx)
if (pipe->Readers ++ == 0)
111ccb: 8b 43 10 mov 0x10(%ebx),%eax
111cce: 8d 50 01 lea 0x1(%eax),%edx
111cd1: 89 53 10 mov %edx,0x10(%ebx)
111cd4: 85 c0 test %eax,%eax
111cd6: 0f 84 b4 01 00 00 je 111e90 <fifo_open+0x3a0> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
111cdc: ff 43 24 incl 0x24(%ebx)
if (pipe->Writers ++ == 0)
111cdf: 8b 43 14 mov 0x14(%ebx),%eax
111ce2: 8d 50 01 lea 0x1(%eax),%edx
111ce5: 89 53 14 mov %edx,0x14(%ebx)
111ce8: 85 c0 test %eax,%eax
111cea: 0f 85 88 fe ff ff jne 111b78 <fifo_open+0x88> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
111cf0: 83 ec 08 sub $0x8,%esp
111cf3: 8d 45 e4 lea -0x1c(%ebp),%eax
111cf6: 50 push %eax
111cf7: ff 73 2c pushl 0x2c(%ebx)
111cfa: e8 81 1b 00 00 call 113880 <rtems_barrier_release>
111cff: 83 c4 10 add $0x10,%esp
111d02: e9 71 fe ff ff jmp 111b78 <fifo_open+0x88>
111d07: 90 nop
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
111d08: 83 ec 0c sub $0xc,%esp
111d0b: 6a 34 push $0x34
111d0d: e8 ce 83 ff ff call 10a0e0 <malloc>
111d12: 89 c3 mov %eax,%ebx
111d14: 89 45 d4 mov %eax,-0x2c(%ebp)
if (pipe == NULL)
111d17: 83 c4 10 add $0x10,%esp
111d1a: 85 c0 test %eax,%eax
111d1c: 0f 84 32 02 00 00 je 111f54 <fifo_open+0x464>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
111d22: b9 34 00 00 00 mov $0x34,%ecx
111d27: 31 c0 xor %eax,%eax
111d29: 89 df mov %ebx,%edi
111d2b: f3 aa rep stos %al,%es:(%edi)
pipe->Size = PIPE_BUF;
111d2d: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx)
pipe->Buffer = malloc(pipe->Size);
111d34: 83 ec 0c sub $0xc,%esp
111d37: 68 00 02 00 00 push $0x200
111d3c: e8 9f 83 ff ff call 10a0e0 <malloc>
111d41: 89 03 mov %eax,(%ebx)
if (! pipe->Buffer)
111d43: 83 c4 10 add $0x10,%esp
111d46: 85 c0 test %eax,%eax
111d48: 0f 84 f8 01 00 00 je 111f46 <fifo_open+0x456> <== NEVER TAKEN
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
111d4e: 8d 43 2c lea 0x2c(%ebx),%eax
111d51: 50 push %eax
111d52: 6a 00 push $0x0
111d54: 6a 00 push $0x0
rtems_build_name ('P', 'I', 'r', c),
111d56: 0f be 05 38 84 12 00 movsbl 0x128438,%eax
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
111d5d: 0d 00 72 49 50 or $0x50497200,%eax
111d62: 50 push %eax
111d63: e8 9c 19 00 00 call 113704 <rtems_barrier_create>
111d68: 83 c4 10 add $0x10,%esp
111d6b: 85 c0 test %eax,%eax
111d6d: 0f 85 c3 01 00 00 jne 111f36 <fifo_open+0x446>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
111d73: 8d 43 30 lea 0x30(%ebx),%eax
111d76: 50 push %eax
111d77: 6a 00 push $0x0
111d79: 6a 00 push $0x0
rtems_build_name ('P', 'I', 'w', c),
111d7b: 0f be 05 38 84 12 00 movsbl 0x128438,%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(
111d82: 0d 00 77 49 50 or $0x50497700,%eax
111d87: 50 push %eax
111d88: e8 77 19 00 00 call 113704 <rtems_barrier_create>
111d8d: 83 c4 10 add $0x10,%esp
111d90: 85 c0 test %eax,%eax
111d92: 0f 85 8d 01 00 00 jne 111f25 <fifo_open+0x435>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
111d98: 83 ec 0c sub $0xc,%esp
111d9b: 8d 43 28 lea 0x28(%ebx),%eax
111d9e: 50 push %eax
111d9f: 6a 00 push $0x0
111da1: 6a 10 push $0x10
111da3: 6a 01 push $0x1
rtems_build_name ('P', 'I', 's', c), 1,
111da5: 0f be 05 38 84 12 00 movsbl 0x128438,%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(
111dac: 0d 00 73 49 50 or $0x50497300,%eax
111db1: 50 push %eax
111db2: e8 e9 b4 ff ff call 10d2a0 <rtems_semaphore_create>
111db7: 83 c4 20 add $0x20,%esp
111dba: 85 c0 test %eax,%eax
111dbc: 0f 85 52 01 00 00 jne 111f14 <fifo_open+0x424>
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
_Objects_Get( &_Barrier_Information, id, location );
111dc2: 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
111dc3: 8d 7d e0 lea -0x20(%ebp),%edi
111dc6: 57 push %edi
111dc7: ff 73 2c pushl 0x2c(%ebx)
111dca: 68 20 b2 12 00 push $0x12b220
111dcf: e8 88 ce ff ff call 10ec5c <_Objects_Get>
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
111dd4: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax)
_Thread_Enable_dispatch();
111ddb: e8 34 da ff ff call 10f814 <_Thread_Enable_dispatch>
111de0: 83 c4 0c add $0xc,%esp
111de3: 57 push %edi
111de4: ff 73 30 pushl 0x30(%ebx)
111de7: 68 20 b2 12 00 push $0x12b220
111dec: e8 6b ce ff ff call 10ec5c <_Objects_Get>
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
111df1: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax)
_Thread_Enable_dispatch();
111df8: e8 17 da ff ff call 10f814 <_Thread_Enable_dispatch>
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
111dfd: a0 38 84 12 00 mov 0x128438,%al
111e02: 8d 50 01 lea 0x1(%eax),%edx
111e05: 88 15 38 84 12 00 mov %dl,0x128438
111e0b: 83 c4 10 add $0x10,%esp
111e0e: 3c 7a cmp $0x7a,%al
111e10: 0f 85 13 fd ff ff jne 111b29 <fifo_open+0x39>
c = 'a';
111e16: c6 05 38 84 12 00 61 movb $0x61,0x128438
111e1d: e9 07 fd ff ff jmp 111b29 <fifo_open+0x39>
111e22: 66 90 xchg %ax,%ax
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
111e24: 85 ff test %edi,%edi
111e26: 0f 85 94 00 00 00 jne 111ec0 <fifo_open+0x3d0> <== NEVER TAKEN
pipe_free(pipe);
else
*pipep = pipe;
111e2c: 89 1e mov %ebx,(%esi)
}
out:
pipe_unlock();
111e2e: e8 c9 fb ff ff call 1119fc <pipe_unlock>
111e33: e9 1e fd ff ff jmp 111b56 <fifo_open+0x66>
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
sc = rtems_semaphore_create(
111e38: 83 ec 0c sub $0xc,%esp
111e3b: 68 ac a4 12 00 push $0x12a4ac
111e40: 6a 00 push $0x0
111e42: 6a 54 push $0x54
111e44: 6a 01 push $0x1
111e46: 68 45 50 49 50 push $0x50495045
111e4b: e8 50 b4 ff ff call 10d2a0 <rtems_semaphore_create>
111e50: 89 c3 mov %eax,%ebx
111e52: 83 c4 14 add $0x14,%esp
111e55: ff 35 c8 a6 12 00 pushl 0x12a6c8
111e5b: e8 b8 b7 ff ff call 10d618 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
111e60: 83 c4 10 add $0x10,%esp
111e63: 85 db test %ebx,%ebx
111e65: 0f 84 f0 00 00 00 je 111f5b <fifo_open+0x46b>
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
111e6b: bf f4 ff ff ff mov $0xfffffff4,%edi
111e70: e9 13 fd ff ff jmp 111b88 <fifo_open+0x98>
111e75: 8d 76 00 lea 0x0(%esi),%esi
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
111e78: 83 ec 08 sub $0x8,%esp
111e7b: 8d 45 e4 lea -0x1c(%ebp),%eax
111e7e: 50 push %eax
111e7f: ff 73 30 pushl 0x30(%ebx)
111e82: e8 f9 19 00 00 call 113880 <rtems_barrier_release>
111e87: 83 c4 10 add $0x10,%esp
111e8a: e9 d9 fd ff ff jmp 111c68 <fifo_open+0x178>
111e8f: 90 nop
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
111e90: 83 ec 08 sub $0x8,%esp
111e93: 8d 45 e4 lea -0x1c(%ebp),%eax
111e96: 50 push %eax
111e97: ff 73 30 pushl 0x30(%ebx)
111e9a: e8 e1 19 00 00 call 113880 <rtems_barrier_release>
111e9f: 83 c4 10 add $0x10,%esp
111ea2: e9 35 fe ff ff jmp 111cdc <fifo_open+0x1ec>
111ea7: 90 nop
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
111ea8: 83 ec 08 sub $0x8,%esp
111eab: 8d 45 e4 lea -0x1c(%ebp),%eax
111eae: 50 push %eax
111eaf: ff 73 2c pushl 0x2c(%ebx)
111eb2: e8 c9 19 00 00 call 113880 <rtems_barrier_release>
111eb7: 83 c4 10 add $0x10,%esp
111eba: e9 25 fd ff ff jmp 111be4 <fifo_open+0xf4>
111ebf: 90 nop
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
111ec0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
111ec3: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED
111ec6: e8 25 19 00 00 call 1137f0 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
111ecb: 59 pop %ecx <== NOT EXECUTED
111ecc: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED
111ecf: e8 1c 19 00 00 call 1137f0 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
111ed4: 5a pop %edx <== NOT EXECUTED
111ed5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED
111ed8: e8 9b b5 ff ff call 10d478 <rtems_semaphore_delete><== NOT EXECUTED
free(pipe->Buffer);
111edd: 58 pop %eax <== NOT EXECUTED
111ede: ff 33 pushl (%ebx) <== NOT EXECUTED
111ee0: e8 0b 7b ff ff call 1099f0 <free> <== NOT EXECUTED
free(pipe);
111ee5: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED
111ee8: e8 03 7b ff ff call 1099f0 <free> <== NOT EXECUTED
111eed: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
else
*pipep = pipe;
}
out:
pipe_unlock();
111ef0: e8 07 fb ff ff call 1119fc <pipe_unlock>
111ef5: e9 8e fc ff ff jmp 111b88 <fifo_open+0x98>
111efa: 66 90 xchg %ax,%ax
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
111efc: 83 ec 0c sub $0xc,%esp
111eff: ff 73 28 pushl 0x28(%ebx)
111f02: e8 11 b7 ff ff call 10d618 <rtems_semaphore_release>
err = -ENXIO;
goto out_error;
111f07: 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;
111f0a: bf fa ff ff ff mov $0xfffffffa,%edi
goto out_error;
111f0f: e9 2c fd ff ff jmp 111c40 <fifo_open+0x150>
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
111f14: 83 ec 0c sub $0xc,%esp
111f17: 8b 45 d4 mov -0x2c(%ebp),%eax
111f1a: ff 70 30 pushl 0x30(%eax)
111f1d: e8 ce 18 00 00 call 1137f0 <rtems_barrier_delete>
111f22: 83 c4 10 add $0x10,%esp
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
111f25: 83 ec 0c sub $0xc,%esp
111f28: 8b 55 d4 mov -0x2c(%ebp),%edx
111f2b: ff 72 2c pushl 0x2c(%edx)
111f2e: e8 bd 18 00 00 call 1137f0 <rtems_barrier_delete>
111f33: 83 c4 10 add $0x10,%esp
err_rbar:
free(pipe->Buffer);
111f36: 83 ec 0c sub $0xc,%esp
111f39: 8b 45 d4 mov -0x2c(%ebp),%eax
111f3c: ff 30 pushl (%eax)
111f3e: e8 ad 7a ff ff call 1099f0 <free>
111f43: 83 c4 10 add $0x10,%esp
err_buf:
free(pipe);
111f46: 83 ec 0c sub $0xc,%esp
111f49: ff 75 d4 pushl -0x2c(%ebp)
111f4c: e8 9f 7a ff ff call 1099f0 <free>
111f51: 83 c4 10 add $0x10,%esp
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
111f54: bf f4 ff ff ff mov $0xfffffff4,%edi
111f59: eb 95 jmp 111ef0 <fifo_open+0x400>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
111f5b: a1 ac a4 12 00 mov 0x12a4ac,%eax
111f60: e9 a4 fb ff ff jmp 111b09 <fifo_open+0x19>
0011002c <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)
{
11002c: 55 push %ebp
11002d: 89 e5 mov %esp,%ebp
11002f: 56 push %esi
110030: 53 push %ebx
110031: 8b 75 08 mov 0x8(%ebp),%esi
110034: 8b 5d 0c mov 0xc(%ebp),%ebx
find_arg *fa = arg;
if ( strcmp( entry->type, fa->type ) != 0 ) {
110037: 83 ec 08 sub $0x8,%esp
11003a: ff 33 pushl (%ebx)
11003c: ff 36 pushl (%esi)
11003e: e8 19 3f 00 00 call 113f5c <strcmp>
110043: 83 c4 10 add $0x10,%esp
110046: 85 c0 test %eax,%eax
110048: 75 12 jne 11005c <find_handler+0x30>
return false;
} else {
fa->mount_h = entry->mount_h;
11004a: 8b 46 04 mov 0x4(%esi),%eax
11004d: 89 43 04 mov %eax,0x4(%ebx)
return true;
110050: b0 01 mov $0x1,%al
}
}
110052: 8d 65 f8 lea -0x8(%ebp),%esp
110055: 5b pop %ebx
110056: 5e pop %esi
110057: c9 leave
110058: c3 ret
110059: 8d 76 00 lea 0x0(%esi),%esi
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;
11005c: 31 c0 xor %eax,%eax
} else {
fa->mount_h = entry->mount_h;
return true;
}
}
11005e: 8d 65 f8 lea -0x8(%ebp),%esp
110061: 5b pop %ebx
110062: 5e pop %esi
110063: c9 leave
110064: c3 ret
00108d40 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
108d40: 55 push %ebp
108d41: 89 e5 mov %esp,%ebp
108d43: 83 ec 08 sub $0x8,%esp
108d46: 8b 45 08 mov 0x8(%ebp),%eax
108d49: 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);
108d4c: 3b 05 6c 56 12 00 cmp 0x12566c,%eax
108d52: 0f 83 ac 00 00 00 jae 108e04 <fpathconf+0xc4>
iop = rtems_libio_iop(fd);
108d58: 8d 0c c5 00 00 00 00 lea 0x0(,%eax,8),%ecx
108d5f: 8d 04 cd 00 00 00 00 lea 0x0(,%ecx,8),%eax
108d66: 29 c8 sub %ecx,%eax
108d68: 03 05 20 99 12 00 add 0x129920,%eax
rtems_libio_check_is_open(iop);
108d6e: 8b 48 14 mov 0x14(%eax),%ecx
108d71: f6 c5 01 test $0x1,%ch
108d74: 0f 84 8a 00 00 00 je 108e04 <fpathconf+0xc4> <== NEVER TAKEN
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
108d7a: 83 e1 02 and $0x2,%ecx
108d7d: 74 08 je 108d87 <fpathconf+0x47>
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
108d7f: 8b 40 28 mov 0x28(%eax),%eax
switch ( name ) {
108d82: 83 fa 0b cmp $0xb,%edx
108d85: 76 15 jbe 108d9c <fpathconf+0x5c>
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
108d87: e8 b8 b6 00 00 call 114444 <__errno>
108d8c: c7 00 16 00 00 00 movl $0x16,(%eax)
108d92: b8 ff ff ff ff mov $0xffffffff,%eax
break;
}
return return_value;
}
108d97: c9 leave
108d98: c3 ret
108d99: 8d 76 00 lea 0x0(%esi),%esi
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
108d9c: ff 24 95 d8 2f 12 00 jmp *0x122fd8(,%edx,4)
108da3: 90 nop
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
108da4: 8b 40 5c mov 0x5c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108da7: c9 leave
108da8: c3 ret
108da9: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
108dac: 8b 40 50 mov 0x50(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108daf: c9 leave
108db0: c3 ret
108db1: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
108db4: 8b 40 64 mov 0x64(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108db7: c9 leave
108db8: c3 ret
108db9: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
108dbc: 8b 40 58 mov 0x58(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108dbf: c9 leave
108dc0: c3 ret
108dc1: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
108dc4: 8b 40 54 mov 0x54(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108dc7: c9 leave
108dc8: c3 ret
108dc9: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
108dcc: 8b 40 4c mov 0x4c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108dcf: c9 leave
108dd0: c3 ret
108dd1: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
108dd4: 8b 40 48 mov 0x48(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108dd7: c9 leave
108dd8: c3 ret
108dd9: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
108ddc: 8b 40 44 mov 0x44(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108ddf: c9 leave
108de0: c3 ret
108de1: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
108de4: 8b 40 40 mov 0x40(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108de7: c9 leave
108de8: c3 ret
108de9: 8d 76 00 lea 0x0(%esi),%esi
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
108dec: 8b 40 3c mov 0x3c(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108def: c9 leave
108df0: c3 ret
108df1: 8d 76 00 lea 0x0(%esi),%esi
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
108df4: 8b 40 38 mov 0x38(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108df7: c9 leave
108df8: c3 ret
108df9: 8d 76 00 lea 0x0(%esi),%esi
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
108dfc: 8b 40 60 mov 0x60(%eax),%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108dff: c9 leave
108e00: c3 ret
108e01: 8d 76 00 lea 0x0(%esi),%esi
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
108e04: e8 3b b6 00 00 call 114444 <__errno>
108e09: c7 00 09 00 00 00 movl $0x9,(%eax)
108e0f: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
108e14: c9 leave
108e15: c3 ret
001080d4 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
1080d4: 55 push %ebp
1080d5: 89 e5 mov %esp,%ebp
1080d7: 53 push %ebx
1080d8: 83 ec 04 sub $0x4,%esp
1080db: 8b 5d 08 mov 0x8(%ebp),%ebx
MSBUMP(free_calls, 1);
1080de: ff 05 0c 7d 12 00 incl 0x127d0c
if ( !ptr )
1080e4: 85 db test %ebx,%ebx
1080e6: 74 4b je 108133 <free+0x5f>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
1080e8: 83 3d e0 7f 12 00 03 cmpl $0x3,0x127fe0
1080ef: 74 47 je 108138 <free+0x64> <== ALWAYS TAKEN
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
1080f1: a1 a8 60 12 00 mov 0x1260a8,%eax
1080f6: 85 c0 test %eax,%eax
1080f8: 74 0a je 108104 <free+0x30>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
1080fa: 83 ec 0c sub $0xc,%esp
1080fd: 53 push %ebx
1080fe: ff 50 08 call *0x8(%eax)
108101: 83 c4 10 add $0x10,%esp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
108104: 83 ec 08 sub $0x8,%esp
108107: 53 push %ebx
108108: ff 35 70 3a 12 00 pushl 0x123a70
10810e: e8 69 50 00 00 call 10d17c <_Protected_heap_Free>
108113: 83 c4 10 add $0x10,%esp
108116: 84 c0 test %al,%al
108118: 75 19 jne 108133 <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
10811a: a1 70 3a 12 00 mov 0x123a70,%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",
10811f: ff 70 1c pushl 0x1c(%eax)
108122: ff 70 18 pushl 0x18(%eax)
108125: 53 push %ebx
108126: 68 d0 13 12 00 push $0x1213d0
10812b: e8 b4 0d 00 00 call 108ee4 <printk>
108130: 83 c4 10 add $0x10,%esp
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
108133: 8b 5d fc mov -0x4(%ebp),%ebx
108136: c9 leave
108137: 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() ) {
108138: e8 3b 01 00 00 call 108278 <malloc_is_system_state_OK>
return;
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
10813d: 84 c0 test %al,%al
10813f: 75 b0 jne 1080f1 <free+0x1d>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
108141: 89 5d 08 mov %ebx,0x8(%ebp)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
108144: 8b 5d fc mov -0x4(%ebp),%ebx
108147: 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);
108148: e9 97 01 00 00 jmp 1082e4 <malloc_deferred_free>
001095a8 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
1095a8: 55 push %ebp
1095a9: 89 e5 mov %esp,%ebp
1095ab: 53 push %ebx
1095ac: 83 ec 04 sub $0x4,%esp
1095af: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
1095b2: 81 fb 80 86 12 00 cmp $0x128680,%ebx
1095b8: 74 26 je 1095e0 <free_user_env+0x38> <== NEVER TAKEN
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
1095ba: 83 ec 0c sub $0xc,%esp
1095bd: 8d 43 04 lea 0x4(%ebx),%eax
1095c0: 50 push %eax
1095c1: e8 4a ef ff ff call 108510 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &env->root_directory);
1095c6: 8d 43 18 lea 0x18(%ebx),%eax
1095c9: 89 04 24 mov %eax,(%esp)
1095cc: e8 3f ef ff ff call 108510 <rtems_filesystem_freenode>
free(env);
1095d1: 83 c4 10 add $0x10,%esp
1095d4: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
1095d7: 8b 5d fc mov -0x4(%ebp),%ebx
1095da: c9 leave
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
1095db: e9 44 ef ff ff jmp 108524 <free>
}
}
1095e0: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1095e3: c9 leave <== NOT EXECUTED
1095e4: c3 ret <== NOT EXECUTED
0011f03c <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
11f03c: 55 push %ebp
11f03d: 89 e5 mov %esp,%ebp
11f03f: 57 push %edi
11f040: 53 push %ebx
11f041: 8b 45 08 mov 0x8(%ebp),%eax
11f044: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_libio_t *iop;
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
11f047: 85 db test %ebx,%ebx
11f049: 74 55 je 11f0a0 <fstat+0x64>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
11f04b: 3b 05 2c 3a 12 00 cmp 0x123a2c,%eax
11f051: 73 39 jae 11f08c <fstat+0x50>
11f053: c1 e0 03 shl $0x3,%eax
11f056: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
11f05d: 29 c2 sub %eax,%edx
11f05f: 03 15 e0 7c 12 00 add 0x127ce0,%edx
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
11f065: f6 42 15 01 testb $0x1,0x15(%edx)
11f069: 74 21 je 11f08c <fstat+0x50>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
11f06b: b9 48 00 00 00 mov $0x48,%ecx
11f070: 31 c0 xor %eax,%eax
11f072: 89 df mov %ebx,%edi
11f074: f3 aa rep stos %al,%es:(%edi)
return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf );
11f076: 8b 42 20 mov 0x20(%edx),%eax
11f079: 89 5d 0c mov %ebx,0xc(%ebp)
11f07c: 83 c2 18 add $0x18,%edx
11f07f: 89 55 08 mov %edx,0x8(%ebp)
11f082: 8b 40 18 mov 0x18(%eax),%eax
}
11f085: 5b pop %ebx
11f086: 5f pop %edi
11f087: 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 );
11f088: ff e0 jmp *%eax
11f08a: 66 90 xchg %ax,%ax
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
11f08c: e8 53 42 ff ff call 1132e4 <__errno>
11f091: 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 );
}
11f097: b8 ff ff ff ff mov $0xffffffff,%eax
11f09c: 5b pop %ebx
11f09d: 5f pop %edi
11f09e: c9 leave
11f09f: c3 ret
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
11f0a0: e8 3f 42 ff ff call 1132e4 <__errno>
11f0a5: c7 00 0e 00 00 00 movl $0xe,(%eax)
11f0ab: eb ea jmp 11f097 <fstat+0x5b>
00108f34 <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
108f34: 55 push %ebp
108f35: 89 e5 mov %esp,%ebp
108f37: 83 ec 08 sub $0x8,%esp
108f3a: 8b 45 08 mov 0x8(%ebp),%eax
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
108f3d: 3b 05 6c 56 12 00 cmp 0x12566c,%eax
108f43: 73 2f jae 108f74 <fsync+0x40>
iop = rtems_libio_iop( fd );
108f45: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
108f4c: 8d 04 d5 00 00 00 00 lea 0x0(,%edx,8),%eax
108f53: 29 d0 sub %edx,%eax
108f55: 03 05 20 99 12 00 add 0x129920,%eax
rtems_libio_check_is_open(iop);
108f5b: 8b 50 14 mov 0x14(%eax),%edx
108f5e: f6 c6 01 test $0x1,%dh
108f61: 74 11 je 108f74 <fsync+0x40>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
108f63: 83 e2 04 and $0x4,%edx
108f66: 74 20 je 108f88 <fsync+0x54>
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
108f68: 8b 50 20 mov 0x20(%eax),%edx
108f6b: 89 45 08 mov %eax,0x8(%ebp)
108f6e: 8b 42 28 mov 0x28(%edx),%eax
}
108f71: c9 leave
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
108f72: ff e0 jmp *%eax
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
108f74: e8 cb b4 00 00 call 114444 <__errno>
108f79: c7 00 09 00 00 00 movl $0x9,(%eax)
/*
* Now process the fsync().
*/
return (*iop->pathinfo.handlers->fsync_h)( iop );
}
108f7f: b8 ff ff ff ff mov $0xffffffff,%eax
108f84: c9 leave
108f85: c3 ret
108f86: 66 90 xchg %ax,%ax
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 );
108f88: e8 b7 b4 00 00 call 114444 <__errno>
108f8d: c7 00 16 00 00 00 movl $0x16,(%eax)
108f93: eb ea jmp 108f7f <fsync+0x4b>
0010fd1c <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
10fd1c: 55 push %ebp
10fd1d: 89 e5 mov %esp,%ebp
10fd1f: 57 push %edi
10fd20: 56 push %esi
10fd21: 53 push %ebx
10fd22: 83 ec 3c sub $0x3c,%esp
10fd25: 8b 45 08 mov 0x8(%ebp),%eax
10fd28: 8b 55 0c mov 0xc(%ebp),%edx
10fd2b: 8b 4d 10 mov 0x10(%ebp),%ecx
10fd2e: 89 55 c0 mov %edx,-0x40(%ebp)
10fd31: 89 4d c4 mov %ecx,-0x3c(%ebp)
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
10fd34: 3b 05 2c 3a 12 00 cmp 0x123a2c,%eax
10fd3a: 73 58 jae 10fd94 <ftruncate+0x78>
iop = rtems_libio_iop( fd );
10fd3c: c1 e0 03 shl $0x3,%eax
10fd3f: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
10fd46: 29 c3 sub %eax,%ebx
10fd48: 03 1d e0 7c 12 00 add 0x127ce0,%ebx
rtems_libio_check_is_open(iop);
10fd4e: f6 43 15 01 testb $0x1,0x15(%ebx)
10fd52: 74 40 je 10fd94 <ftruncate+0x78>
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
10fd54: 8d 7d d4 lea -0x2c(%ebp),%edi
10fd57: 8d 73 18 lea 0x18(%ebx),%esi
10fd5a: b9 05 00 00 00 mov $0x5,%ecx
10fd5f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
10fd61: 83 ec 0c sub $0xc,%esp
10fd64: 8d 45 d4 lea -0x2c(%ebp),%eax
10fd67: 50 push %eax
10fd68: 8b 45 e0 mov -0x20(%ebp),%eax
10fd6b: ff 50 10 call *0x10(%eax)
10fd6e: 83 c4 10 add $0x10,%esp
10fd71: 48 dec %eax
10fd72: 74 46 je 10fdba <ftruncate+0x9e>
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
10fd74: f6 43 14 04 testb $0x4,0x14(%ebx)
10fd78: 74 2e je 10fda8 <ftruncate+0x8c>
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
10fd7a: 50 push %eax
10fd7b: 8b 43 20 mov 0x20(%ebx),%eax
10fd7e: ff 75 c4 pushl -0x3c(%ebp)
10fd81: ff 75 c0 pushl -0x40(%ebp)
10fd84: 53 push %ebx
10fd85: ff 50 20 call *0x20(%eax)
10fd88: 83 c4 10 add $0x10,%esp
}
10fd8b: 8d 65 f4 lea -0xc(%ebp),%esp
10fd8e: 5b pop %ebx
10fd8f: 5e pop %esi
10fd90: 5f pop %edi
10fd91: c9 leave
10fd92: c3 ret
10fd93: 90 nop
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);
10fd94: e8 4b 35 00 00 call 1132e4 <__errno>
10fd99: c7 00 09 00 00 00 movl $0x9,(%eax)
10fd9f: b8 ff ff ff ff mov $0xffffffff,%eax
10fda4: eb e5 jmp 10fd8b <ftruncate+0x6f>
10fda6: 66 90 xchg %ax,%ax
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 );
10fda8: e8 37 35 00 00 call 1132e4 <__errno>
10fdad: c7 00 16 00 00 00 movl $0x16,(%eax)
10fdb3: b8 ff ff ff ff mov $0xffffffff,%eax
10fdb8: eb d1 jmp 10fd8b <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 );
10fdba: e8 25 35 00 00 call 1132e4 <__errno>
10fdbf: c7 00 15 00 00 00 movl $0x15,(%eax)
10fdc5: b8 ff ff ff ff mov $0xffffffff,%eax
10fdca: eb bf jmp 10fd8b <ftruncate+0x6f>
00108320 <getchark>:
#include <rtems.h>
#include <rtems/bspIo.h>
int getchark(void)
{
108320: 55 push %ebp
108321: 89 e5 mov %esp,%ebp
108323: 83 ec 08 sub $0x8,%esp
if ( BSP_poll_char )
108326: a1 2c 3f 12 00 mov 0x123f2c,%eax
10832b: 85 c0 test %eax,%eax
10832d: 74 05 je 108334 <getchark+0x14>
return (*BSP_poll_char)();
return -1;
}
10832f: c9 leave
#include <rtems/bspIo.h>
int getchark(void)
{
if ( BSP_poll_char )
return (*BSP_poll_char)();
108330: ff e0 jmp *%eax
108332: 66 90 xchg %ax,%ax
return -1;
}
108334: b8 ff ff ff ff mov $0xffffffff,%eax
108339: c9 leave
10833a: c3 ret
00120a30 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
120a30: 55 push %ebp
120a31: 89 e5 mov %esp,%ebp
120a33: 57 push %edi
120a34: 56 push %esi
120a35: 53 push %ebx
120a36: 83 ec 2c sub $0x2c,%esp
120a39: 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 );
120a3c: 3b 05 4c 65 12 00 cmp 0x12654c,%eax
120a42: 73 4c jae 120a90 <getdents+0x60> <== NEVER TAKEN
120a44: c1 e0 03 shl $0x3,%eax
120a47: 8d 1c c5 00 00 00 00 lea 0x0(,%eax,8),%ebx
120a4e: 29 c3 sub %eax,%ebx
120a50: 03 1d 40 a9 12 00 add 0x12a940,%ebx
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
120a56: 8d 7d d4 lea -0x2c(%ebp),%edi
120a59: 8d 73 18 lea 0x18(%ebx),%esi
120a5c: b9 05 00 00 00 mov $0x5,%ecx
120a61: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
120a63: 83 ec 0c sub $0xc,%esp
120a66: 8d 45 d4 lea -0x2c(%ebp),%eax
120a69: 50 push %eax
120a6a: 8b 45 e0 mov -0x20(%ebp),%eax
120a6d: ff 50 10 call *0x10(%eax)
120a70: 83 c4 10 add $0x10,%esp
120a73: 48 dec %eax
120a74: 75 1e jne 120a94 <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 );
120a76: 50 push %eax
120a77: 8b 43 20 mov 0x20(%ebx),%eax
120a7a: ff 75 10 pushl 0x10(%ebp)
120a7d: ff 75 0c pushl 0xc(%ebp)
120a80: 53 push %ebx
120a81: ff 50 08 call *0x8(%eax)
120a84: 83 c4 10 add $0x10,%esp
}
120a87: 8d 65 f4 lea -0xc(%ebp),%esp
120a8a: 5b pop %ebx
120a8b: 5e pop %esi
120a8c: 5f pop %edi
120a8d: c9 leave
120a8e: c3 ret
120a8f: 90 nop
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
120a90: 31 db xor %ebx,%ebx
120a92: eb c2 jmp 120a56 <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 );
120a94: e8 9b 38 ff ff call 114334 <__errno>
120a99: c7 00 14 00 00 00 movl $0x14,(%eax)
120a9f: b8 ff ff ff ff mov $0xffffffff,%eax
120aa4: eb e1 jmp 120a87 <getdents+0x57>
00108b54 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
108b54: 55 push %ebp
108b55: 89 e5 mov %esp,%ebp
108b57: 57 push %edi
108b58: 56 push %esi
108b59: 53 push %ebx
108b5a: 83 ec 1c sub $0x1c,%esp
108b5d: 89 c3 mov %eax,%ebx
108b5f: 89 55 e4 mov %edx,-0x1c(%ebp)
108b62: 89 ce mov %ecx,%esi
FILE *fp;
int match;
init_etc_passwd_group();
108b64: e8 eb fe ff ff call 108a54 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL)
108b69: 83 ec 08 sub $0x8,%esp
108b6c: 68 32 18 12 00 push $0x121832
108b71: 68 59 2d 12 00 push $0x122d59
108b76: e8 15 be 00 00 call 114990 <fopen>
108b7b: 89 c7 mov %eax,%edi
108b7d: 83 c4 10 add $0x10,%esp
108b80: 85 c0 test %eax,%eax
108b82: 75 22 jne 108ba6 <getgr_r+0x52>
108b84: e9 8b 00 00 00 jmp 108c14 <getgr_r+0xc0>
108b89: 8d 76 00 lea 0x0(%esi),%esi
for(;;) {
if (!scangr(fp, grp, buffer, bufsize))
goto error_einval;
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
108b8c: 83 ec 08 sub $0x8,%esp
108b8f: 53 push %ebx
108b90: ff 36 pushl (%esi)
108b92: e8 75 cc 00 00 call 11580c <strcmp>
108b97: 83 c4 10 add $0x10,%esp
108b9a: 85 c0 test %eax,%eax
108b9c: 0f 94 c0 sete %al
108b9f: 0f b6 c0 movzbl %al,%eax
} else {
match = (grp->gr_gid == gid);
}
if (match) {
108ba2: 85 c0 test %eax,%eax
108ba4: 75 2e jne 108bd4 <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))
108ba6: 83 ec 0c sub $0xc,%esp
108ba9: ff 75 0c pushl 0xc(%ebp)
108bac: 8b 4d 08 mov 0x8(%ebp),%ecx
108baf: 89 f2 mov %esi,%edx
108bb1: 89 f8 mov %edi,%eax
108bb3: e8 88 fc ff ff call 108840 <scangr>
108bb8: 83 c4 10 add $0x10,%esp
108bbb: 85 c0 test %eax,%eax
108bbd: 74 31 je 108bf0 <getgr_r+0x9c>
goto error_einval;
if (name) {
108bbf: 85 db test %ebx,%ebx
108bc1: 75 c9 jne 108b8c <getgr_r+0x38>
match = (strcmp(grp->gr_name, name) == 0);
} else {
match = (grp->gr_gid == gid);
108bc3: 0f b7 46 08 movzwl 0x8(%esi),%eax
108bc7: 3b 45 e4 cmp -0x1c(%ebp),%eax
108bca: 0f 94 c0 sete %al
108bcd: 0f b6 c0 movzbl %al,%eax
}
if (match) {
108bd0: 85 c0 test %eax,%eax
108bd2: 74 d2 je 108ba6 <getgr_r+0x52>
fclose(fp);
108bd4: 83 ec 0c sub $0xc,%esp
108bd7: 57 push %edi
108bd8: e8 af b6 00 00 call 11428c <fclose>
*result = grp;
108bdd: 8b 45 10 mov 0x10(%ebp),%eax
108be0: 89 30 mov %esi,(%eax)
return 0;
108be2: 83 c4 10 add $0x10,%esp
108be5: 31 c0 xor %eax,%eax
}
}
error_einval:
fclose(fp);
rtems_set_errno_and_return_minus_one( EINVAL );
}
108be7: 8d 65 f4 lea -0xc(%ebp),%esp
108bea: 5b pop %ebx
108beb: 5e pop %esi
108bec: 5f pop %edi
108bed: c9 leave
108bee: c3 ret
108bef: 90 nop
*result = grp;
return 0;
}
}
error_einval:
fclose(fp);
108bf0: 83 ec 0c sub $0xc,%esp
108bf3: 57 push %edi
108bf4: e8 93 b6 00 00 call 11428c <fclose>
rtems_set_errno_and_return_minus_one( EINVAL );
108bf9: e8 36 b5 00 00 call 114134 <__errno>
108bfe: c7 00 16 00 00 00 movl $0x16,(%eax)
108c04: 83 c4 10 add $0x10,%esp
108c07: b8 ff ff ff ff mov $0xffffffff,%eax
}
108c0c: 8d 65 f4 lea -0xc(%ebp),%esp
108c0f: 5b pop %ebx
108c10: 5e pop %esi
108c11: 5f pop %edi
108c12: c9 leave
108c13: c3 ret
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
108c14: e8 1b b5 00 00 call 114134 <__errno>
108c19: c7 00 16 00 00 00 movl $0x16,(%eax)
108c1f: 83 c8 ff or $0xffffffff,%eax
108c22: eb c3 jmp 108be7 <getgr_r+0x93>
00108e78 <getgrnam>:
}
struct group *getgrnam(
const char *name
)
{
108e78: 55 push %ebp
108e79: 89 e5 mov %esp,%ebp
108e7b: 83 ec 24 sub $0x24,%esp
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
108e7e: 8d 45 f4 lea -0xc(%ebp),%eax
108e81: 50 push %eax
108e82: 68 c8 00 00 00 push $0xc8
108e87: 68 c0 93 12 00 push $0x1293c0
108e8c: 68 a4 93 12 00 push $0x1293a4
108e91: ff 75 08 pushl 0x8(%ebp)
108e94: e8 b3 ff ff ff call 108e4c <getgrnam_r>
108e99: 83 c4 20 add $0x20,%esp
108e9c: 85 c0 test %eax,%eax
108e9e: 75 08 jne 108ea8 <getgrnam+0x30>
return NULL;
return p;
108ea0: 8b 45 f4 mov -0xc(%ebp),%eax
}
108ea3: c9 leave
108ea4: c3 ret
108ea5: 8d 76 00 lea 0x0(%esi),%esi
)
{
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
return NULL;
108ea8: 31 c0 xor %eax,%eax
return p;
}
108eaa: c9 leave
108eab: c3 ret
0010b27c <getitimer>:
int getitimer(
int which,
struct itimerval *value
)
{
10b27c: 55 push %ebp
10b27d: 89 e5 mov %esp,%ebp
10b27f: 83 ec 08 sub $0x8,%esp
if ( !value )
10b282: 8b 45 0c mov 0xc(%ebp),%eax
10b285: 85 c0 test %eax,%eax
10b287: 74 2f je 10b2b8 <getitimer+0x3c>
rtems_set_errno_and_return_minus_one( EFAULT );
switch ( which ) {
10b289: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10b28d: 76 15 jbe 10b2a4 <getitimer+0x28>
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b28f: e8 60 87 00 00 call 1139f4 <__errno>
10b294: c7 00 16 00 00 00 movl $0x16,(%eax)
}
10b29a: b8 ff ff ff ff mov $0xffffffff,%eax
10b29f: c9 leave
10b2a0: c3 ret
10b2a1: 8d 76 00 lea 0x0(%esi),%esi
switch ( which ) {
case ITIMER_REAL:
case ITIMER_VIRTUAL:
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
10b2a4: e8 4b 87 00 00 call 1139f4 <__errno>
10b2a9: c7 00 58 00 00 00 movl $0x58,(%eax)
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b2af: b8 ff ff ff ff mov $0xffffffff,%eax
10b2b4: c9 leave
10b2b5: c3 ret
10b2b6: 66 90 xchg %ax,%ax
int which,
struct itimerval *value
)
{
if ( !value )
rtems_set_errno_and_return_minus_one( EFAULT );
10b2b8: e8 37 87 00 00 call 1139f4 <__errno>
10b2bd: c7 00 0e 00 00 00 movl $0xe,(%eax)
10b2c3: eb d5 jmp 10b29a <getitimer+0x1e>
00108618 <getlogin_r>:
*/
int getlogin_r(
char *name,
size_t namesize
)
{
108618: 55 push %ebp
108619: 89 e5 mov %esp,%ebp
10861b: 53 push %ebx
10861c: 83 ec 04 sub $0x4,%esp
10861f: 8b 5d 08 mov 0x8(%ebp),%ebx
struct passwd *pw;
char *pname;
if ( !name )
108622: 85 db test %ebx,%ebx
108624: 74 42 je 108668 <getlogin_r+0x50>
return EFAULT;
if ( namesize < LOGIN_NAME_MAX )
108626: 83 7d 0c 08 cmpl $0x8,0xc(%ebp)
10862a: 77 0c ja 108638 <getlogin_r+0x20>
return ERANGE;
10862c: b8 22 00 00 00 mov $0x22,%eax
if ( pw )
pname = pw->pw_name;
strncpy( name, pname, LOGIN_NAME_MAX );
return 0;
}
108631: 8b 5d fc mov -0x4(%ebp),%ebx
108634: c9 leave
108635: c3 ret
108636: 66 90 xchg %ax,%ax
return ERANGE;
/* Set the pointer to a default name */
pname = "";
pw = getpwuid(getuid());
108638: e8 e7 09 00 00 call 109024 <getuid>
10863d: 83 ec 0c sub $0xc,%esp
108640: 0f b7 c0 movzwl %ax,%eax
108643: 50 push %eax
108644: e8 37 07 00 00 call 108d80 <getpwuid>
if ( pw )
108649: 83 c4 10 add $0x10,%esp
10864c: 85 c0 test %eax,%eax
10864e: 74 20 je 108670 <getlogin_r+0x58>
pname = pw->pw_name;
108650: 8b 00 mov (%eax),%eax
strncpy( name, pname, LOGIN_NAME_MAX );
108652: 52 push %edx
108653: 6a 09 push $0x9
108655: 50 push %eax
108656: 53 push %ebx
108657: e8 30 d3 00 00 call 11598c <strncpy>
return 0;
10865c: 83 c4 10 add $0x10,%esp
10865f: 31 c0 xor %eax,%eax
}
108661: 8b 5d fc mov -0x4(%ebp),%ebx
108664: c9 leave
108665: c3 ret
108666: 66 90 xchg %ax,%ax
{
struct passwd *pw;
char *pname;
if ( !name )
return EFAULT;
108668: b8 0e 00 00 00 mov $0xe,%eax
10866d: eb c2 jmp 108631 <getlogin_r+0x19>
10866f: 90 nop
if ( namesize < LOGIN_NAME_MAX )
return ERANGE;
/* Set the pointer to a default name */
pname = "";
108670: b8 a9 2e 12 00 mov $0x122ea9,%eax
108675: eb db jmp 108652 <getlogin_r+0x3a>
00108c24 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
108c24: 55 push %ebp
108c25: 89 e5 mov %esp,%ebp
108c27: 57 push %edi
108c28: 56 push %esi
108c29: 53 push %ebx
108c2a: 83 ec 1c sub $0x1c,%esp
108c2d: 89 c3 mov %eax,%ebx
108c2f: 89 55 e4 mov %edx,-0x1c(%ebp)
108c32: 89 ce mov %ecx,%esi
FILE *fp;
int match;
init_etc_passwd_group();
108c34: e8 1b fe ff ff call 108a54 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL)
108c39: 83 ec 08 sub $0x8,%esp
108c3c: 68 32 18 12 00 push $0x121832
108c41: 68 4d 2d 12 00 push $0x122d4d
108c46: e8 45 bd 00 00 call 114990 <fopen>
108c4b: 89 c7 mov %eax,%edi
108c4d: 83 c4 10 add $0x10,%esp
108c50: 85 c0 test %eax,%eax
108c52: 75 22 jne 108c76 <getpw_r+0x52>
108c54: e9 8b 00 00 00 jmp 108ce4 <getpw_r+0xc0>
108c59: 8d 76 00 lea 0x0(%esi),%esi
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize))
goto error_einval;
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
108c5c: 83 ec 08 sub $0x8,%esp
108c5f: 53 push %ebx
108c60: ff 36 pushl (%esi)
108c62: e8 a5 cb 00 00 call 11580c <strcmp>
108c67: 83 c4 10 add $0x10,%esp
108c6a: 85 c0 test %eax,%eax
108c6c: 0f 94 c0 sete %al
108c6f: 0f b6 c0 movzbl %al,%eax
} else {
match = (pwd->pw_uid == uid);
}
if (match) {
108c72: 85 c0 test %eax,%eax
108c74: 75 2e jne 108ca4 <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))
108c76: 83 ec 0c sub $0xc,%esp
108c79: ff 75 0c pushl 0xc(%ebp)
108c7c: 8b 4d 08 mov 0x8(%ebp),%ecx
108c7f: 89 f2 mov %esi,%edx
108c81: 89 f8 mov %edi,%eax
108c83: e8 d0 fc ff ff call 108958 <scanpw>
108c88: 83 c4 10 add $0x10,%esp
108c8b: 85 c0 test %eax,%eax
108c8d: 74 31 je 108cc0 <getpw_r+0x9c>
goto error_einval;
if (name) {
108c8f: 85 db test %ebx,%ebx
108c91: 75 c9 jne 108c5c <getpw_r+0x38>
match = (strcmp(pwd->pw_name, name) == 0);
} else {
match = (pwd->pw_uid == uid);
108c93: 0f b7 46 08 movzwl 0x8(%esi),%eax
108c97: 3b 45 e4 cmp -0x1c(%ebp),%eax
108c9a: 0f 94 c0 sete %al
108c9d: 0f b6 c0 movzbl %al,%eax
}
if (match) {
108ca0: 85 c0 test %eax,%eax
108ca2: 74 d2 je 108c76 <getpw_r+0x52>
fclose(fp);
108ca4: 83 ec 0c sub $0xc,%esp
108ca7: 57 push %edi
108ca8: e8 df b5 00 00 call 11428c <fclose>
*result = pwd;
108cad: 8b 45 10 mov 0x10(%ebp),%eax
108cb0: 89 30 mov %esi,(%eax)
return 0;
108cb2: 83 c4 10 add $0x10,%esp
108cb5: 31 c0 xor %eax,%eax
}
}
error_einval:
fclose(fp);
rtems_set_errno_and_return_minus_one( EINVAL );
}
108cb7: 8d 65 f4 lea -0xc(%ebp),%esp
108cba: 5b pop %ebx
108cbb: 5e pop %esi
108cbc: 5f pop %edi
108cbd: c9 leave
108cbe: c3 ret
108cbf: 90 nop
*result = pwd;
return 0;
}
}
error_einval:
fclose(fp);
108cc0: 83 ec 0c sub $0xc,%esp
108cc3: 57 push %edi
108cc4: e8 c3 b5 00 00 call 11428c <fclose>
rtems_set_errno_and_return_minus_one( EINVAL );
108cc9: e8 66 b4 00 00 call 114134 <__errno>
108cce: c7 00 16 00 00 00 movl $0x16,(%eax)
108cd4: 83 c4 10 add $0x10,%esp
108cd7: b8 ff ff ff ff mov $0xffffffff,%eax
}
108cdc: 8d 65 f4 lea -0xc(%ebp),%esp
108cdf: 5b pop %ebx
108ce0: 5e pop %esi
108ce1: 5f pop %edi
108ce2: c9 leave
108ce3: c3 ret
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/passwd", "r")) == NULL)
rtems_set_errno_and_return_minus_one( EINVAL );
108ce4: e8 4b b4 00 00 call 114134 <__errno>
108ce9: c7 00 16 00 00 00 movl $0x16,(%eax)
108cef: 83 c8 ff or $0xffffffff,%eax
108cf2: eb c3 jmp 108cb7 <getpw_r+0x93>
00108d20 <getpwnam>:
}
struct passwd *getpwnam(
const char *name
)
{
108d20: 55 push %ebp
108d21: 89 e5 mov %esp,%ebp
108d23: 83 ec 24 sub $0x24,%esp
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
108d26: 8d 45 f4 lea -0xc(%ebp),%eax
108d29: 50 push %eax
108d2a: 68 c8 00 00 00 push $0xc8
108d2f: 68 c0 94 12 00 push $0x1294c0
108d34: 68 8c 94 12 00 push $0x12948c
108d39: ff 75 08 pushl 0x8(%ebp)
108d3c: e8 b3 ff ff ff call 108cf4 <getpwnam_r>
108d41: 83 c4 20 add $0x20,%esp
108d44: 85 c0 test %eax,%eax
108d46: 75 08 jne 108d50 <getpwnam+0x30>
return NULL;
return p;
108d48: 8b 45 f4 mov -0xc(%ebp),%eax
}
108d4b: c9 leave
108d4c: c3 ret
108d4d: 8d 76 00 lea 0x0(%esi),%esi
)
{
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
return NULL;
108d50: 31 c0 xor %eax,%eax
return p;
}
108d52: c9 leave
108d53: c3 ret
00112740 <imfs_dir_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
112740: 55 push %ebp
112741: 89 e5 mov %esp,%ebp
112743: 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 )
112746: 8b 50 18 mov 0x18(%eax),%edx
112749: 83 7a 4c 01 cmpl $0x1,0x4c(%edx)
11274d: 74 09 je 112758 <imfs_dir_open+0x18> <== ALWAYS TAKEN
return -1; /* It wasn't a directory --> return error */
11274f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
iop->offset = 0;
return 0;
}
112754: c9 leave <== NOT EXECUTED
112755: c3 ret <== NOT EXECUTED
112756: 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;
112758: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
11275f: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
return 0;
112766: 31 c0 xor %eax,%eax
}
112768: c9 leave
112769: c3 ret
0011276c <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
11276c: 55 push %ebp
11276d: 89 e5 mov %esp,%ebp
11276f: 57 push %edi
112770: 56 push %esi
112771: 53 push %ebx
112772: 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;
112778: 8b 55 08 mov 0x8(%ebp),%edx
11277b: 8b 42 18 mov 0x18(%edx),%eax
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
11277e: 8b 58 50 mov 0x50(%eax),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
112781: 83 c0 54 add $0x54,%eax
112784: 89 85 cc fe ff ff mov %eax,-0x134(%ebp)
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->pathinfo.node_access;
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
11278a: 39 c3 cmp %eax,%ebx
11278c: 0f 84 2a 01 00 00 je 1128bc <imfs_dir_read+0x150>
/* Move to the first of the desired directory entries */
the_node = rtems_chain_first( the_chain );
bytes_transferred = 0;
first_entry = iop->offset;
112792: 8b 42 0c mov 0xc(%edx),%eax
112795: 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);
11279b: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx
1127a0: 8b 45 10 mov 0x10(%ebp),%eax
1127a3: f7 e2 mul %edx
1127a5: c1 ea 08 shr $0x8,%edx
1127a8: 89 d0 mov %edx,%eax
1127aa: c1 e0 04 shl $0x4,%eax
1127ad: c1 e2 08 shl $0x8,%edx
1127b0: 8d 14 10 lea (%eax,%edx,1),%edx
1127b3: 03 95 d4 fe ff ff add -0x12c(%ebp),%edx
1127b9: 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 (
1127bf: 85 d2 test %edx,%edx
1127c1: 0f 8e f5 00 00 00 jle 1128bc <imfs_dir_read+0x150> <== NEVER TAKEN
1127c7: 31 d2 xor %edx,%edx
1127c9: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp)
1127d0: 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 );
1127d3: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax
1127d9: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp)
1127df: eb 23 jmp 112804 <imfs_dir_read+0x98>
1127e1: 8d 76 00 lea 0x0(%esi),%esi
);
iop->offset = iop->offset + sizeof(struct dirent);
bytes_transferred = bytes_transferred + sizeof( struct dirent );
}
the_node = the_node->next;
1127e4: 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(
1127e6: 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 (
1127ec: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp)
1127f2: 0f 8e b4 00 00 00 jle 1128ac <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 ) ){
1127f8: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx
1127fe: 0f 84 a8 00 00 00 je 1128ac <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 ) {
112804: 39 95 d4 fe ff ff cmp %edx,-0x12c(%ebp)
11280a: 7f d8 jg 1127e4 <imfs_dir_read+0x78>
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
11280c: 89 95 dc fe ff ff mov %edx,-0x124(%ebp)
112812: 89 d0 mov %edx,%eax
112814: c1 f8 1f sar $0x1f,%eax
112817: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp)
tmp_dirent.d_reclen = sizeof( struct dirent );
11281d: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp)
112824: 10 01
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
112826: 8b 43 38 mov 0x38(%ebx),%eax
112829: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp)
tmp_dirent.d_namlen = strlen( the_jnode->name );
11282f: 8d 73 0c lea 0xc(%ebx),%esi
112832: 31 c0 xor %eax,%eax
112834: b9 ff ff ff ff mov $0xffffffff,%ecx
112839: 89 f7 mov %esi,%edi
11283b: f2 ae repnz scas %es:(%edi),%al
11283d: f7 d1 not %ecx
11283f: 49 dec %ecx
112840: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp)
strcpy( tmp_dirent.d_name, the_jnode->name );
112847: 83 ec 08 sub $0x8,%esp
11284a: 56 push %esi
11284b: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax
112851: 50 push %eax
112852: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp)
112858: e8 57 17 00 00 call 113fb4 <strcpy>
memcpy(
11285d: 8b 45 0c mov 0xc(%ebp),%eax
112860: 03 85 c8 fe ff ff add -0x138(%ebp),%eax
112866: b9 44 00 00 00 mov $0x44,%ecx
11286b: 89 c7 mov %eax,%edi
11286d: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi
112873: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
112875: 8b 45 08 mov 0x8(%ebp),%eax
112878: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax)
11287f: 83 50 10 00 adcl $0x0,0x10(%eax)
bytes_transferred = bytes_transferred + sizeof( struct dirent );
112883: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp)
11288a: 01 00 00
11288d: 83 c4 10 add $0x10,%esp
112890: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx
}
the_node = the_node->next;
112896: 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(
112898: 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 (
11289e: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp)
1128a4: 0f 8f 4e ff ff ff jg 1127f8 <imfs_dir_read+0x8c> <== NEVER TAKEN
1128aa: 66 90 xchg %ax,%ax
current_entry = 0;
current_entry < last_entry;
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
1128ac: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
1128b2: 8d 65 f4 lea -0xc(%ebp),%esp
1128b5: 5b pop %ebx
1128b6: 5e pop %esi
1128b7: 5f pop %edi
1128b8: c9 leave
1128b9: c3 ret
1128ba: 66 90 xchg %ax,%ax
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;
1128bc: 31 c0 xor %eax,%eax
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
1128be: 8d 65 f4 lea -0xc(%ebp),%esp
1128c1: 5b pop %ebx
1128c2: 5e pop %esi
1128c3: 5f pop %edi
1128c4: c9 leave
1128c5: c3 ret
001129f8 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
1129f8: 55 push %ebp
1129f9: 89 e5 mov %esp,%ebp
1129fb: 53 push %ebx
1129fc: 83 ec 04 sub $0x4,%esp
1129ff: 8b 45 0c mov 0xc(%ebp),%eax
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
112a02: 8b 18 mov (%eax),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
112a04: 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 ) )
112a07: 39 53 50 cmp %edx,0x50(%ebx)
112a0a: 75 44 jne 112a50 <imfs_dir_rmnod+0x58>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
112a0c: 8b 40 10 mov 0x10(%eax),%eax
112a0f: 3b 58 1c cmp 0x1c(%eax),%ebx
112a12: 74 24 je 112a38 <imfs_dir_rmnod+0x40>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
112a14: 8b 4b 5c mov 0x5c(%ebx),%ecx
112a17: 85 c9 test %ecx,%ecx
112a19: 75 1d jne 112a38 <imfs_dir_rmnod+0x40> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
112a1b: 83 ec 0c sub $0xc,%esp
112a1e: 53 push %ebx
112a1f: e8 58 d0 ff ff call 10fa7c <IMFS_create_orphan>
IMFS_check_node_remove( the_jnode );
112a24: 89 1c 24 mov %ebx,(%esp)
112a27: e8 94 d0 ff ff call 10fac0 <IMFS_check_node_remove>
return 0;
112a2c: 83 c4 10 add $0x10,%esp
112a2f: 31 c0 xor %eax,%eax
}
112a31: 8b 5d fc mov -0x4(%ebp),%ebx
112a34: c9 leave
112a35: c3 ret
112a36: 66 90 xchg %ax,%ax
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
112a38: e8 a7 08 00 00 call 1132e4 <__errno>
112a3d: c7 00 10 00 00 00 movl $0x10,(%eax)
112a43: b8 ff ff ff ff mov $0xffffffff,%eax
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
112a48: 8b 5d fc mov -0x4(%ebp),%ebx
112a4b: c9 leave
112a4c: c3 ret
112a4d: 8d 76 00 lea 0x0(%esi),%esi
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
112a50: e8 8f 08 00 00 call 1132e4 <__errno>
112a55: c7 00 5a 00 00 00 movl $0x5a,(%eax)
112a5b: b8 ff ff ff ff mov $0xffffffff,%eax
112a60: eb cf jmp 112a31 <imfs_dir_rmnod+0x39>
00108a54 <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
108a54: 55 push %ebp
108a55: 89 e5 mov %esp,%ebp
108a57: 53 push %ebx
108a58: 83 ec 04 sub $0x4,%esp
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
108a5b: 80 3d 88 95 12 00 00 cmpb $0x0,0x129588
108a62: 74 08 je 108a6c <init_etc_passwd_group+0x18>
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
108a64: 8b 5d fc mov -0x4(%ebp),%ebx
108a67: c9 leave
108a68: c3 ret
108a69: 8d 76 00 lea 0x0(%esi),%esi
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
108a6c: c6 05 88 95 12 00 01 movb $0x1,0x129588
mkdir("/etc", 0777);
108a73: 83 ec 08 sub $0x8,%esp
108a76: 68 ff 01 00 00 push $0x1ff
108a7b: 68 48 2d 12 00 push $0x122d48
108a80: e8 37 08 00 00 call 1092bc <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
108a85: 59 pop %ecx
108a86: 5b pop %ebx
108a87: 68 32 18 12 00 push $0x121832
108a8c: 68 4d 2d 12 00 push $0x122d4d
108a91: e8 fa be 00 00 call 114990 <fopen>
108a96: 83 c4 10 add $0x10,%esp
108a99: 85 c0 test %eax,%eax
108a9b: 74 77 je 108b14 <init_etc_passwd_group+0xc0>
fclose(fp);
108a9d: 83 ec 0c sub $0xc,%esp
108aa0: 50 push %eax
108aa1: e8 e6 b7 00 00 call 11428c <fclose>
108aa6: 83 c4 10 add $0x10,%esp
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
108aa9: 83 ec 08 sub $0x8,%esp
108aac: 68 32 18 12 00 push $0x121832
108ab1: 68 59 2d 12 00 push $0x122d59
108ab6: e8 d5 be 00 00 call 114990 <fopen>
108abb: 83 c4 10 add $0x10,%esp
108abe: 85 c0 test %eax,%eax
108ac0: 74 12 je 108ad4 <init_etc_passwd_group+0x80>
fclose(fp);
108ac2: 83 ec 0c sub $0xc,%esp
108ac5: 50 push %eax
108ac6: e8 c1 b7 00 00 call 11428c <fclose>
108acb: 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);
}
}
108ace: 8b 5d fc mov -0x4(%ebp),%ebx
108ad1: c9 leave
108ad2: c3 ret
108ad3: 90 nop
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
108ad4: 83 ec 08 sub $0x8,%esp
108ad7: 68 14 17 12 00 push $0x121714
108adc: 68 59 2d 12 00 push $0x122d59
108ae1: e8 aa be 00 00 call 114990 <fopen>
108ae6: 89 c3 mov %eax,%ebx
108ae8: 83 c4 10 add $0x10,%esp
108aeb: 85 c0 test %eax,%eax
108aed: 0f 84 71 ff ff ff je 108a64 <init_etc_passwd_group+0x10><== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
108af3: 50 push %eax
108af4: 6a 2a push $0x2a
108af6: 6a 01 push $0x1
108af8: 68 cc 2d 12 00 push $0x122dcc
108afd: e8 62 c6 00 00 call 115164 <fwrite>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
108b02: 89 1c 24 mov %ebx,(%esp)
108b05: e8 82 b7 00 00 call 11428c <fclose>
108b0a: 83 c4 10 add $0x10,%esp
108b0d: e9 52 ff ff ff jmp 108a64 <init_etc_passwd_group+0x10>
108b12: 66 90 xchg %ax,%ax
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
108b14: 83 ec 08 sub $0x8,%esp
108b17: 68 14 17 12 00 push $0x121714
108b1c: 68 4d 2d 12 00 push $0x122d4d
108b21: e8 6a be 00 00 call 114990 <fopen>
108b26: 89 c3 mov %eax,%ebx
108b28: 83 c4 10 add $0x10,%esp
108b2b: 85 c0 test %eax,%eax
108b2d: 0f 84 76 ff ff ff je 108aa9 <init_etc_passwd_group+0x55><== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
108b33: 50 push %eax
108b34: 6a 66 push $0x66
108b36: 6a 01 push $0x1
108b38: 68 64 2d 12 00 push $0x122d64
108b3d: e8 22 c6 00 00 call 115164 <fwrite>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
108b42: 89 1c 24 mov %ebx,(%esp)
108b45: e8 42 b7 00 00 call 11428c <fclose>
108b4a: 83 c4 10 add $0x10,%esp
108b4d: e9 57 ff ff ff jmp 108aa9 <init_etc_passwd_group+0x55>
00109fb4 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
109fb4: 55 push %ebp
109fb5: 89 e5 mov %esp,%ebp
109fb7: 56 push %esi
109fb8: 53 push %ebx
109fb9: 89 d6 mov %edx,%esi
109fbb: 88 c3 mov %al,%bl
if (tty->termios.c_iflag & ISTRIP)
109fbd: 8b 42 30 mov 0x30(%edx),%eax
109fc0: a8 20 test $0x20,%al
109fc2: 74 03 je 109fc7 <iproc+0x13> <== ALWAYS TAKEN
c &= 0x7f;
109fc4: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
109fc7: f6 c4 02 test $0x2,%ah
109fca: 74 18 je 109fe4 <iproc+0x30>
c = tolower (c);
109fcc: 0f b6 db movzbl %bl,%ebx
109fcf: 8b 15 54 5b 12 00 mov 0x125b54,%edx
109fd5: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx
109fda: 83 e2 03 and $0x3,%edx
109fdd: 4a dec %edx
109fde: 0f 84 9c 00 00 00 je 10a080 <iproc+0xcc>
if (c == '\r') {
109fe4: 80 fb 0d cmp $0xd,%bl
109fe7: 74 33 je 10a01c <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)) {
109fe9: 80 fb 0a cmp $0xa,%bl
109fec: 0f 84 86 00 00 00 je 10a078 <iproc+0xc4>
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
109ff2: 84 db test %bl,%bl
109ff4: 75 3a jne 10a030 <iproc+0x7c> <== ALWAYS TAKEN
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
109ff6: 8b 46 20 mov 0x20(%esi),%eax
109ff9: 8b 15 40 5a 12 00 mov 0x125a40,%edx
109fff: 4a dec %edx
10a000: 39 d0 cmp %edx,%eax
10a002: 7d 1c jge 10a020 <iproc+0x6c> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
10a004: f6 46 3c 08 testb $0x8,0x3c(%esi)
10a008: 75 7e jne 10a088 <iproc+0xd4> <== ALWAYS TAKEN
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
10a00a: 8b 56 1c mov 0x1c(%esi),%edx
10a00d: 88 1c 02 mov %bl,(%edx,%eax,1)
10a010: 40 inc %eax
10a011: 89 46 20 mov %eax,0x20(%esi)
}
return 0;
10a014: 31 c0 xor %eax,%eax
}
10a016: 5b pop %ebx
10a017: 5e pop %esi
10a018: c9 leave
10a019: c3 ret
10a01a: 66 90 xchg %ax,%ax
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
10a01c: a8 80 test $0x80,%al
10a01e: 74 08 je 10a028 <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;
10a020: 31 c0 xor %eax,%eax
}
10a022: 5b pop %ebx <== NOT EXECUTED
10a023: 5e pop %esi <== NOT EXECUTED
10a024: c9 leave <== NOT EXECUTED
10a025: c3 ret <== NOT EXECUTED
10a026: 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)
10a028: f6 c4 01 test $0x1,%ah
10a02b: 74 03 je 10a030 <iproc+0x7c> <== NEVER TAKEN
c = '\n';
10a02d: b3 0a mov $0xa,%bl
10a02f: 90 nop
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
10a030: 8b 46 3c mov 0x3c(%esi),%eax
10a033: a8 02 test $0x2,%al
10a035: 74 bf je 109ff6 <iproc+0x42>
if (c == tty->termios.c_cc[VERASE]) {
10a037: 38 5e 43 cmp %bl,0x43(%esi)
10a03a: 0f 84 b0 00 00 00 je 10a0f0 <iproc+0x13c>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
10a040: 38 5e 44 cmp %bl,0x44(%esi)
10a043: 74 63 je 10a0a8 <iproc+0xf4>
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
10a045: 38 5e 45 cmp %bl,0x45(%esi)
10a048: 0f 84 96 00 00 00 je 10a0e4 <iproc+0x130> <== NEVER TAKEN
return 1;
} else if (c == '\n') {
10a04e: 80 fb 0a cmp $0xa,%bl
10a051: 74 69 je 10a0bc <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]) ||
10a053: 38 5e 4c cmp %bl,0x4c(%esi)
10a056: 74 05 je 10a05d <iproc+0xa9> <== NEVER TAKEN
10a058: 38 5e 51 cmp %bl,0x51(%esi)
10a05b: 75 99 jne 109ff6 <iproc+0x42> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
10a05d: a8 08 test $0x8,%al <== NOT EXECUTED
10a05f: 75 3b jne 10a09c <iproc+0xe8> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
10a061: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED
10a064: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED
10a067: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED
10a06a: 40 inc %eax <== NOT EXECUTED
10a06b: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED
return 1;
10a06e: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10a073: eb a1 jmp 10a016 <iproc+0x62> <== NOT EXECUTED
10a075: 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)) {
10a078: a8 40 test $0x40,%al
10a07a: 74 b4 je 10a030 <iproc+0x7c> <== ALWAYS TAKEN
c = '\r';
10a07c: b3 0d mov $0xd,%bl <== NOT EXECUTED
10a07e: eb b0 jmp 10a030 <iproc+0x7c> <== NOT EXECUTED
{
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
10a080: 83 c3 20 add $0x20,%ebx
10a083: e9 5c ff ff ff jmp 109fe4 <iproc+0x30>
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
10a088: 0f b6 c3 movzbl %bl,%eax
10a08b: 89 f2 mov %esi,%edx
10a08d: e8 f2 fc ff ff call 109d84 <echo>
10a092: 8b 46 20 mov 0x20(%esi),%eax
10a095: e9 70 ff ff ff jmp 10a00a <iproc+0x56>
10a09a: 66 90 xchg %ax,%ax
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);
10a09c: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED
10a09f: 89 f2 mov %esi,%edx <== NOT EXECUTED
10a0a1: e8 de fc ff ff call 109d84 <echo> <== NOT EXECUTED
10a0a6: eb b9 jmp 10a061 <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);
10a0a8: ba 01 00 00 00 mov $0x1,%edx
10a0ad: 89 f0 mov %esi,%eax
10a0af: e8 34 fd ff ff call 109de8 <erase>
return 0;
10a0b4: 31 c0 xor %eax,%eax
10a0b6: e9 5b ff ff ff jmp 10a016 <iproc+0x62>
10a0bb: 90 nop
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
10a0bc: a8 48 test $0x48,%al
10a0be: 74 0c je 10a0cc <iproc+0x118> <== NEVER TAKEN
echo (c, tty);
10a0c0: 89 f2 mov %esi,%edx
10a0c2: b8 0a 00 00 00 mov $0xa,%eax
10a0c7: e8 b8 fc ff ff call 109d84 <echo>
tty->cbuf[tty->ccount++] = c;
10a0cc: 8b 46 20 mov 0x20(%esi),%eax
10a0cf: 8b 56 1c mov 0x1c(%esi),%edx
10a0d2: c6 04 02 0a movb $0xa,(%edx,%eax,1)
10a0d6: 40 inc %eax
10a0d7: 89 46 20 mov %eax,0x20(%esi)
return 1;
10a0da: b8 01 00 00 00 mov $0x1,%eax
10a0df: e9 32 ff ff ff jmp 10a016 <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;
10a0e4: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
10a0e9: e9 28 ff ff ff jmp 10a016 <iproc+0x62> <== NOT EXECUTED
10a0ee: 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);
10a0f0: 31 d2 xor %edx,%edx
10a0f2: 89 f0 mov %esi,%eax
10a0f4: e8 ef fc ff ff call 109de8 <erase>
return 0;
10a0f9: 31 c0 xor %eax,%eax
10a0fb: e9 16 ff ff ff jmp 10a016 <iproc+0x62>
00124a28 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
124a28: 55 push %ebp
124a29: 89 e5 mov %esp,%ebp
124a2b: 57 push %edi
124a2c: 56 push %esi
124a2d: 53 push %ebx
124a2e: 83 ec 3c sub $0x3c,%esp
124a31: 8b 75 0c mov 0xc(%ebp),%esi
124a34: 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() )
124a37: e8 00 fd ff ff call 12473c <getpid>
124a3c: 3b 45 08 cmp 0x8(%ebp),%eax
124a3f: 0f 85 3f 02 00 00 jne 124c84 <killinfo+0x25c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
124a45: 85 f6 test %esi,%esi
124a47: 0f 84 4c 02 00 00 je 124c99 <killinfo+0x271> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
124a4d: 8d 4e ff lea -0x1(%esi),%ecx
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
124a50: 83 f9 1f cmp $0x1f,%ecx
124a53: 0f 87 40 02 00 00 ja 124c99 <killinfo+0x271> <== NEVER TAKEN
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 )
124a59: 8d 04 76 lea (%esi,%esi,2),%eax
124a5c: 83 3c 85 e8 f1 12 00 cmpl $0x1,0x12f1e8(,%eax,4)
124a63: 01
124a64: 0f 84 e6 01 00 00 je 124c50 <killinfo+0x228>
/*
* 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 ) )
124a6a: 83 fe 08 cmp $0x8,%esi
124a6d: 0f 84 c9 00 00 00 je 124b3c <killinfo+0x114>
124a73: 83 fe 04 cmp $0x4,%esi
124a76: 0f 84 c0 00 00 00 je 124b3c <killinfo+0x114>
124a7c: 83 fe 0b cmp $0xb,%esi
124a7f: 0f 84 b7 00 00 00 je 124b3c <killinfo+0x114>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
124a85: bb 01 00 00 00 mov $0x1,%ebx
124a8a: d3 e3 shl %cl,%ebx
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
124a8c: 89 75 dc mov %esi,-0x24(%ebp)
siginfo->si_code = SI_USER;
124a8f: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
if ( !value ) {
124a96: 85 ff test %edi,%edi
124a98: 0f 84 ba 01 00 00 je 124c58 <killinfo+0x230>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
124a9e: 8b 07 mov (%edi),%eax
124aa0: 89 45 e4 mov %eax,-0x1c(%ebp)
124aa3: a1 d0 eb 12 00 mov 0x12ebd0,%eax
124aa8: 40 inc %eax
124aa9: a3 d0 eb 12 00 mov %eax,0x12ebd0
/*
* 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;
124aae: 8b 0d 78 f1 12 00 mov 0x12f178,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
124ab4: 8b 81 ec 00 00 00 mov 0xec(%ecx),%eax
124aba: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
124ac0: f7 d0 not %eax
124ac2: 85 c3 test %eax,%ebx
124ac4: 75 34 jne 124afa <killinfo+0xd2>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
124ac6: a1 80 f3 12 00 mov 0x12f380,%eax
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
124acb: 3d 84 f3 12 00 cmp $0x12f384,%eax
124ad0: 75 1b jne 124aed <killinfo+0xc5>
124ad2: e9 81 00 00 00 jmp 124b58 <killinfo+0x130>
124ad7: 90 nop
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
124ad8: 8b 92 d0 00 00 00 mov 0xd0(%edx),%edx
124ade: f7 d2 not %edx
124ae0: 85 d3 test %edx,%ebx
124ae2: 75 16 jne 124afa <killinfo+0xd2>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
124ae4: 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 = _Chain_First( the_chain );
124ae6: 3d 84 f3 12 00 cmp $0x12f384,%eax
124aeb: 74 6b je 124b58 <killinfo+0x130> <== ALWAYS TAKEN
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
124aed: 89 c1 mov %eax,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
124aef: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
124af5: 85 58 30 test %ebx,0x30(%eax)
124af8: 74 de je 124ad8 <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 ) ) {
124afa: 50 push %eax
mask = signo_to_mask( sig );
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
124afb: 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 ) ) {
124afe: 50 push %eax
124aff: 56 push %esi
124b00: 51 push %ecx
124b01: e8 d6 01 00 00 call 124cdc <_POSIX_signals_Unblock_thread>
124b06: 83 c4 10 add $0x10,%esp
124b09: 84 c0 test %al,%al
124b0b: 75 1f jne 124b2c <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 );
124b0d: 83 ec 0c sub $0xc,%esp
124b10: 53 push %ebx
124b11: e8 b2 01 00 00 call 124cc8 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
124b16: 8d 1c 76 lea (%esi,%esi,2),%ebx
124b19: c1 e3 02 shl $0x2,%ebx
124b1c: 83 c4 10 add $0x10,%esp
124b1f: 83 bb e0 f1 12 00 02 cmpl $0x2,0x12f1e0(%ebx)
124b26: 0f 84 e4 00 00 00 je 124c10 <killinfo+0x1e8>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
124b2c: e8 ff df fe ff call 112b30 <_Thread_Enable_dispatch>
return 0;
124b31: 31 c0 xor %eax,%eax
}
124b33: 8d 65 f4 lea -0xc(%ebp),%esp
124b36: 5b pop %ebx
124b37: 5e pop %esi
124b38: 5f pop %edi
124b39: c9 leave
124b3a: c3 ret
124b3b: 90 nop
* 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 );
124b3c: e8 77 03 00 00 call 124eb8 <pthread_self>
124b41: 83 ec 08 sub $0x8,%esp
124b44: 56 push %esi
124b45: 50 push %eax
124b46: e8 b1 02 00 00 call 124dfc <pthread_kill>
124b4b: 83 c4 10 add $0x10,%esp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
124b4e: 8d 65 f4 lea -0xc(%ebp),%esp
124b51: 5b pop %ebx
124b52: 5e pop %esi
124b53: 5f pop %edi
124b54: c9 leave
124b55: c3 ret
124b56: 66 90 xchg %ax,%ax
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
124b58: 0f b6 05 14 a7 12 00 movzbl 0x12a714,%eax
124b5f: 40 inc %eax
124b60: 89 45 d4 mov %eax,-0x2c(%ebp)
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
124b63: 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++) {
124b6a: c7 45 cc 02 00 00 00 movl $0x2,-0x34(%ebp)
124b71: 89 5d d0 mov %ebx,-0x30(%ebp)
124b74: 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 ] )
124b77: 8b 55 cc mov -0x34(%ebp),%edx
124b7a: 8b 04 95 a8 eb 12 00 mov 0x12eba8(,%edx,4),%eax
124b81: 85 c0 test %eax,%eax
124b83: 74 68 je 124bed <killinfo+0x1c5> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
124b85: 8b 40 04 mov 0x4(%eax),%eax
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
124b88: 0f b7 70 10 movzwl 0x10(%eax),%esi
object_table = the_info->local_table;
124b8c: 8b 78 1c mov 0x1c(%eax),%edi
for ( index = 1 ; index <= maximum ; index++ ) {
124b8f: 85 f6 test %esi,%esi
124b91: 74 5a je 124bed <killinfo+0x1c5>
124b93: b8 01 00 00 00 mov $0x1,%eax
the_thread = (Thread_Control *) object_table[ index ];
124b98: 8b 14 87 mov (%edi,%eax,4),%edx
if ( !the_thread )
124b9b: 85 d2 test %edx,%edx
124b9d: 74 49 je 124be8 <killinfo+0x1c0>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
124b9f: 8b 4a 14 mov 0x14(%edx),%ecx
124ba2: 3b 4d d4 cmp -0x2c(%ebp),%ecx
124ba5: 77 41 ja 124be8 <killinfo+0x1c0>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
124ba7: 8b 9a ec 00 00 00 mov 0xec(%edx),%ebx
124bad: 8b 9b d0 00 00 00 mov 0xd0(%ebx),%ebx
124bb3: f7 d3 not %ebx
124bb5: 85 5d d0 test %ebx,-0x30(%ebp)
124bb8: 74 2e je 124be8 <killinfo+0x1c0>
*
* 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 ) {
124bba: 3b 4d d4 cmp -0x2c(%ebp),%ecx
124bbd: 72 21 jb 124be0 <killinfo+0x1b8>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
124bbf: 8b 5d c8 mov -0x38(%ebp),%ebx
124bc2: 85 db test %ebx,%ebx
124bc4: 74 22 je 124be8 <killinfo+0x1c0> <== NEVER TAKEN
124bc6: 8b 5d c8 mov -0x38(%ebp),%ebx
124bc9: 8b 5b 10 mov 0x10(%ebx),%ebx
124bcc: 89 5d c4 mov %ebx,-0x3c(%ebp)
124bcf: 85 db test %ebx,%ebx
124bd1: 74 15 je 124be8 <killinfo+0x1c0> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
124bd3: 8b 5a 10 mov 0x10(%edx),%ebx
124bd6: 85 db test %ebx,%ebx
124bd8: 0f 85 86 00 00 00 jne 124c64 <killinfo+0x23c>
124bde: 66 90 xchg %ax,%ax
124be0: 89 4d d4 mov %ecx,-0x2c(%ebp)
124be3: 89 55 c8 mov %edx,-0x38(%ebp)
124be6: 66 90 xchg %ax,%ax
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
124be8: 40 inc %eax
124be9: 39 c6 cmp %eax,%esi
124beb: 73 ab jae 124b98 <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++) {
124bed: ff 45 cc incl -0x34(%ebp)
124bf0: 83 7d cc 04 cmpl $0x4,-0x34(%ebp)
124bf4: 75 81 jne 124b77 <killinfo+0x14f>
124bf6: 8b 5d d0 mov -0x30(%ebp),%ebx
124bf9: 8b 75 c0 mov -0x40(%ebp),%esi
}
}
}
}
if ( interested ) {
124bfc: 8b 55 c8 mov -0x38(%ebp),%edx
124bff: 85 d2 test %edx,%edx
124c01: 0f 84 06 ff ff ff je 124b0d <killinfo+0xe5>
124c07: 8b 4d c8 mov -0x38(%ebp),%ecx
124c0a: e9 eb fe ff ff jmp 124afa <killinfo+0xd2>
124c0f: 90 nop
_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 );
124c10: 83 ec 0c sub $0xc,%esp
124c13: 68 60 f3 12 00 push $0x12f360
124c18: e8 c7 c4 fe ff call 1110e4 <_Chain_Get>
if ( !psiginfo ) {
124c1d: 83 c4 10 add $0x10,%esp
124c20: 85 c0 test %eax,%eax
124c22: 0f 84 86 00 00 00 je 124cae <killinfo+0x286>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
124c28: 8d 78 08 lea 0x8(%eax),%edi
124c2b: 8d 75 dc lea -0x24(%ebp),%esi
124c2e: b9 03 00 00 00 mov $0x3,%ecx
124c33: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
124c35: 83 ec 08 sub $0x8,%esp
124c38: 50 push %eax
124c39: 81 c3 00 f4 12 00 add $0x12f400,%ebx
124c3f: 53 push %ebx
124c40: e8 63 c4 fe ff call 1110a8 <_Chain_Append>
124c45: 83 c4 10 add $0x10,%esp
124c48: e9 df fe ff ff jmp 124b2c <killinfo+0x104>
124c4d: 8d 76 00 lea 0x0(%esi),%esi
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
124c50: 31 c0 xor %eax,%eax
124c52: e9 f7 fe ff ff jmp 124b4e <killinfo+0x126>
124c57: 90 nop
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
124c58: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
124c5f: e9 3f fe ff ff jmp 124aa3 <killinfo+0x7b>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
124c64: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp)
124c6b: 0f 85 77 ff ff ff jne 124be8 <killinfo+0x1c0>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
124c71: 81 e3 00 00 00 10 and $0x10000000,%ebx
124c77: 0f 84 6b ff ff ff je 124be8 <killinfo+0x1c0>
124c7d: e9 5e ff ff ff jmp 124be0 <killinfo+0x1b8>
124c82: 66 90 xchg %ax,%ax
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
124c84: e8 23 38 ff ff call 1184ac <__errno> <== NOT EXECUTED
124c89: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED
124c8f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
124c94: e9 b5 fe ff ff jmp 124b4e <killinfo+0x126> <== 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 );
124c99: e8 0e 38 ff ff call 1184ac <__errno> <== NOT EXECUTED
124c9e: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
124ca4: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
124ca9: e9 a0 fe ff ff jmp 124b4e <killinfo+0x126> <== NOT EXECUTED
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();
124cae: e8 7d de fe ff call 112b30 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
124cb3: e8 f4 37 ff ff call 1184ac <__errno>
124cb8: c7 00 0b 00 00 00 movl $0xb,(%eax)
124cbe: 83 c8 ff or $0xffffffff,%eax
124cc1: e9 88 fe ff ff jmp 124b4e <killinfo+0x126>
0011f204 <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
11f204: 55 push %ebp
11f205: 89 e5 mov %esp,%ebp
11f207: 53 push %ebx
11f208: 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()))
11f20b: 83 3d e0 7f 12 00 03 cmpl $0x3,0x127fe0
11f212: 74 08 je 11f21c <libc_wrapup+0x18> <== ALWAYS TAKEN
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
}
11f214: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
11f217: c9 leave <== NOT EXECUTED
11f218: c3 ret <== NOT EXECUTED
11f219: 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) {
11f21c: a1 60 5b 12 00 mov 0x125b60,%eax
11f221: 8b 1d a0 1f 12 00 mov 0x121fa0,%ebx
11f227: 39 d8 cmp %ebx,%eax
11f229: 74 14 je 11f23f <libc_wrapup+0x3b>
_wrapup_reent(_global_impure_ptr);
11f22b: 83 ec 0c sub $0xc,%esp
11f22e: 53 push %ebx
11f22f: e8 f8 05 00 00 call 11f82c <_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;
11f234: 89 1d 60 5b 12 00 mov %ebx,0x125b60
11f23a: 83 c4 10 add $0x10,%esp
11f23d: 89 d8 mov %ebx,%eax
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
11f23f: 83 ec 0c sub $0xc,%esp
11f242: ff 70 04 pushl 0x4(%eax)
11f245: e8 f2 41 ff ff call 11343c <fclose>
fclose (stdout);
11f24a: 5a pop %edx
11f24b: a1 60 5b 12 00 mov 0x125b60,%eax
11f250: ff 70 08 pushl 0x8(%eax)
11f253: e8 e4 41 ff ff call 11343c <fclose>
fclose (stderr);
11f258: 58 pop %eax
11f259: a1 60 5b 12 00 mov 0x125b60,%eax
11f25e: ff 70 0c pushl 0xc(%eax)
11f261: e8 d6 41 ff ff call 11343c <fclose>
11f266: 83 c4 10 add $0x10,%esp
}
11f269: 8b 5d fc mov -0x4(%ebp),%ebx
11f26c: c9 leave
11f26d: c3 ret
0010b598 <link>:
int link(
const char *existing,
const char *new
)
{
10b598: 55 push %ebp
10b599: 89 e5 mov %esp,%ebp
10b59b: 57 push %edi
10b59c: 56 push %esi
10b59d: 53 push %ebx
10b59e: 83 ec 58 sub $0x58,%esp
10b5a1: 8b 55 08 mov 0x8(%ebp),%edx
10b5a4: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
10b5a7: 31 c0 xor %eax,%eax
10b5a9: b9 ff ff ff ff mov $0xffffffff,%ecx
10b5ae: 89 d7 mov %edx,%edi
10b5b0: f2 ae repnz scas %es:(%edi),%al
10b5b2: f7 d1 not %ecx
10b5b4: 49 dec %ecx
10b5b5: 6a 01 push $0x1
10b5b7: 8d 75 cc lea -0x34(%ebp),%esi
10b5ba: 56 push %esi
10b5bb: 6a 00 push $0x0
10b5bd: 51 push %ecx
10b5be: 52 push %edx
10b5bf: e8 28 f9 ff ff call 10aeec <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
10b5c4: 83 c4 20 add $0x20,%esp
10b5c7: 85 c0 test %eax,%eax
10b5c9: 74 0d je 10b5d8 <link+0x40>
return -1;
10b5cb: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
10b5d0: 8d 65 f4 lea -0xc(%ebp),%esp
10b5d3: 5b pop %ebx
10b5d4: 5e pop %esi
10b5d5: 5f pop %edi
10b5d6: c9 leave
10b5d7: c3 ret
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
10b5d8: 52 push %edx
10b5d9: 8d 7d b8 lea -0x48(%ebp),%edi
10b5dc: 57 push %edi
10b5dd: 8d 45 e4 lea -0x1c(%ebp),%eax
10b5e0: 50 push %eax
10b5e1: 53 push %ebx
10b5e2: e8 1d 13 00 00 call 10c904 <rtems_filesystem_get_start_loc>
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
10b5e7: 83 c4 0c add $0xc,%esp
10b5ea: 8d 45 e0 lea -0x20(%ebp),%eax
10b5ed: 50 push %eax
10b5ee: 57 push %edi
10b5ef: 03 5d e4 add -0x1c(%ebp),%ebx
10b5f2: 53 push %ebx
10b5f3: 8b 45 c4 mov -0x3c(%ebp),%eax
10b5f6: ff 50 04 call *0x4(%eax)
if ( result != 0 ) {
10b5f9: 83 c4 10 add $0x10,%esp
10b5fc: 85 c0 test %eax,%eax
10b5fe: 75 61 jne 10b661 <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 ) {
10b600: 8b 45 dc mov -0x24(%ebp),%eax
10b603: 39 45 c8 cmp %eax,-0x38(%ebp)
10b606: 75 30 jne 10b638 <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 );
10b608: 50 push %eax
10b609: ff 75 e0 pushl -0x20(%ebp)
10b60c: 57 push %edi
10b60d: 56 push %esi
10b60e: 8b 45 c4 mov -0x3c(%ebp),%eax
10b611: ff 50 08 call *0x8(%eax)
rtems_filesystem_freenode( &existing_loc );
10b614: 89 34 24 mov %esi,(%esp)
10b617: 89 45 b4 mov %eax,-0x4c(%ebp)
10b61a: e8 81 fb ff ff call 10b1a0 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &parent_loc );
10b61f: 89 3c 24 mov %edi,(%esp)
10b622: e8 79 fb ff ff call 10b1a0 <rtems_filesystem_freenode>
return result;
10b627: 83 c4 10 add $0x10,%esp
10b62a: 8b 45 b4 mov -0x4c(%ebp),%eax
}
10b62d: 8d 65 f4 lea -0xc(%ebp),%esp
10b630: 5b pop %ebx
10b631: 5e pop %esi
10b632: 5f pop %edi
10b633: c9 leave
10b634: c3 ret
10b635: 8d 76 00 lea 0x0(%esi),%esi
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
rtems_filesystem_freenode( &existing_loc );
10b638: 83 ec 0c sub $0xc,%esp
10b63b: 56 push %esi
10b63c: e8 5f fb ff ff call 10b1a0 <rtems_filesystem_freenode>
rtems_filesystem_freenode( &parent_loc );
10b641: 89 3c 24 mov %edi,(%esp)
10b644: e8 57 fb ff ff call 10b1a0 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EXDEV );
10b649: e8 d6 b8 00 00 call 116f24 <__errno>
10b64e: c7 00 12 00 00 00 movl $0x12,(%eax)
10b654: 83 c4 10 add $0x10,%esp
10b657: b8 ff ff ff ff mov $0xffffffff,%eax
10b65c: e9 6f ff ff ff jmp 10b5d0 <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 );
10b661: 83 ec 0c sub $0xc,%esp
10b664: 56 push %esi
10b665: e8 36 fb ff ff call 10b1a0 <rtems_filesystem_freenode>
return -1;
10b66a: 83 c4 10 add $0x10,%esp
10b66d: b8 ff ff ff ff mov $0xffffffff,%eax
10b672: e9 59 ff ff ff jmp 10b5d0 <link+0x38>
0011f0dc <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
11f0dc: 55 push %ebp
11f0dd: 89 e5 mov %esp,%ebp
11f0df: 57 push %edi
11f0e0: 56 push %esi
11f0e1: 53 push %ebx
11f0e2: 83 ec 1c sub $0x1c,%esp
11f0e5: 8b 5d 08 mov 0x8(%ebp),%ebx
11f0e8: 8b 55 0c mov 0xc(%ebp),%edx
11f0eb: 8b 4d 10 mov 0x10(%ebp),%ecx
11f0ee: 8b 45 14 mov 0x14(%ebp),%eax
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
11f0f1: 3b 1d 2c 3a 12 00 cmp 0x123a2c,%ebx
11f0f7: 0f 83 b3 00 00 00 jae 11f1b0 <lseek+0xd4> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
11f0fd: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi
11f104: 8d 1c f5 00 00 00 00 lea 0x0(,%esi,8),%ebx
11f10b: 29 f3 sub %esi,%ebx
11f10d: 03 1d e0 7c 12 00 add 0x127ce0,%ebx
rtems_libio_check_is_open(iop);
11f113: f6 43 15 01 testb $0x1,0x15(%ebx)
11f117: 0f 84 93 00 00 00 je 11f1b0 <lseek+0xd4>
/*
* Now process the lseek().
*/
old_offset = iop->offset;
11f11d: 8b 73 0c mov 0xc(%ebx),%esi
11f120: 8b 7b 10 mov 0x10(%ebx),%edi
11f123: 89 75 e0 mov %esi,-0x20(%ebp)
11f126: 89 7d e4 mov %edi,-0x1c(%ebp)
switch ( whence ) {
11f129: 83 f8 01 cmp $0x1,%eax
11f12c: 74 6e je 11f19c <lseek+0xc0>
11f12e: 83 f8 02 cmp $0x2,%eax
11f131: 74 35 je 11f168 <lseek+0x8c>
11f133: 85 c0 test %eax,%eax
11f135: 75 45 jne 11f17c <lseek+0xa0>
case SEEK_SET:
iop->offset = offset;
11f137: 89 53 0c mov %edx,0xc(%ebx)
11f13a: 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 );
11f13d: 8b 73 20 mov 0x20(%ebx),%esi
11f140: 50 push %eax
11f141: 51 push %ecx
11f142: 52 push %edx
11f143: 53 push %ebx
11f144: ff 56 14 call *0x14(%esi)
if ( status == (off_t) -1 )
11f147: 83 c4 10 add $0x10,%esp
11f14a: 89 c1 mov %eax,%ecx
11f14c: 21 d1 and %edx,%ecx
11f14e: 41 inc %ecx
11f14f: 75 0c jne 11f15d <lseek+0x81>
iop->offset = old_offset;
11f151: 8b 75 e0 mov -0x20(%ebp),%esi
11f154: 8b 7d e4 mov -0x1c(%ebp),%edi
11f157: 89 73 0c mov %esi,0xc(%ebx)
11f15a: 89 7b 10 mov %edi,0x10(%ebx)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
11f15d: 8d 65 f4 lea -0xc(%ebp),%esp
11f160: 5b pop %ebx
11f161: 5e pop %esi
11f162: 5f pop %edi
11f163: c9 leave
11f164: c3 ret
11f165: 8d 76 00 lea 0x0(%esi),%esi
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
11f168: 89 d6 mov %edx,%esi
11f16a: 89 cf mov %ecx,%edi
11f16c: 03 73 04 add 0x4(%ebx),%esi
11f16f: 13 7b 08 adc 0x8(%ebx),%edi
11f172: 89 73 0c mov %esi,0xc(%ebx)
11f175: 89 7b 10 mov %edi,0x10(%ebx)
break;
11f178: eb c3 jmp 11f13d <lseek+0x61>
11f17a: 66 90 xchg %ax,%ax
default:
rtems_set_errno_and_return_minus_one( EINVAL );
11f17c: e8 63 41 ff ff call 1132e4 <__errno>
11f181: c7 00 16 00 00 00 movl $0x16,(%eax)
11f187: b8 ff ff ff ff mov $0xffffffff,%eax
11f18c: ba ff ff ff ff mov $0xffffffff,%edx
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
11f191: 8d 65 f4 lea -0xc(%ebp),%esp
11f194: 5b pop %ebx
11f195: 5e pop %esi
11f196: 5f pop %edi
11f197: c9 leave
11f198: c3 ret
11f199: 8d 76 00 lea 0x0(%esi),%esi
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
11f19c: 8b 75 e0 mov -0x20(%ebp),%esi
11f19f: 8b 7d e4 mov -0x1c(%ebp),%edi
11f1a2: 01 d6 add %edx,%esi
11f1a4: 11 cf adc %ecx,%edi
11f1a6: 89 73 0c mov %esi,0xc(%ebx)
11f1a9: 89 7b 10 mov %edi,0x10(%ebx)
break;
11f1ac: eb 8f jmp 11f13d <lseek+0x61>
11f1ae: 66 90 xchg %ax,%ax
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
11f1b0: e8 2f 41 ff ff call 1132e4 <__errno>
11f1b5: c7 00 09 00 00 00 movl $0x9,(%eax)
11f1bb: b8 ff ff ff ff mov $0xffffffff,%eax
11f1c0: ba ff ff ff ff mov $0xffffffff,%edx
11f1c5: eb 96 jmp 11f15d <lseek+0x81>
00109eec <lstat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
109eec: 55 push %ebp
109eed: 89 e5 mov %esp,%ebp
109eef: 57 push %edi
109ef0: 56 push %esi
109ef1: 53 push %ebx
109ef2: 83 ec 3c sub $0x3c,%esp
109ef5: 8b 55 08 mov 0x8(%ebp),%edx
109ef8: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
109efb: 85 f6 test %esi,%esi
109efd: 74 65 je 109f64 <lstat+0x78>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
109eff: b9 ff ff ff ff mov $0xffffffff,%ecx
109f04: 89 d7 mov %edx,%edi
109f06: 31 c0 xor %eax,%eax
109f08: f2 ae repnz scas %es:(%edi),%al
109f0a: f7 d1 not %ecx
109f0c: 49 dec %ecx
109f0d: 83 ec 0c sub $0xc,%esp
109f10: 6a 00 push $0x0
109f12: 8d 5d d4 lea -0x2c(%ebp),%ebx
109f15: 53 push %ebx
109f16: 6a 00 push $0x0
109f18: 51 push %ecx
109f19: 52 push %edx
109f1a: e8 e5 f9 ff ff call 109904 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
109f1f: 83 c4 20 add $0x20,%esp
109f22: 85 c0 test %eax,%eax
109f24: 74 0e je 109f34 <lstat+0x48>
return -1;
109f26: b8 ff ff ff ff mov $0xffffffff,%eax
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
109f2b: 8d 65 f4 lea -0xc(%ebp),%esp
109f2e: 5b pop %ebx
109f2f: 5e pop %esi
109f30: 5f pop %edi
109f31: c9 leave
109f32: c3 ret
109f33: 90 nop
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
109f34: b9 48 00 00 00 mov $0x48,%ecx
109f39: 89 f7 mov %esi,%edi
109f3b: f3 aa rep stos %al,%es:(%edi)
status = (*loc.handlers->fstat_h)( &loc, buf );
109f3d: 83 ec 08 sub $0x8,%esp
109f40: 56 push %esi
109f41: 53 push %ebx
109f42: 8b 45 dc mov -0x24(%ebp),%eax
109f45: ff 50 18 call *0x18(%eax)
rtems_filesystem_freenode( &loc );
109f48: 89 1c 24 mov %ebx,(%esp)
109f4b: 89 45 c4 mov %eax,-0x3c(%ebp)
109f4e: e8 89 fa ff ff call 1099dc <rtems_filesystem_freenode>
return status;
109f53: 83 c4 10 add $0x10,%esp
109f56: 8b 45 c4 mov -0x3c(%ebp),%eax
}
109f59: 8d 65 f4 lea -0xc(%ebp),%esp
109f5c: 5b pop %ebx
109f5d: 5e pop %esi
109f5e: 5f pop %edi
109f5f: c9 leave
109f60: c3 ret
109f61: 8d 76 00 lea 0x0(%esi),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
109f64: e8 5f b5 00 00 call 1154c8 <__errno>
109f69: c7 00 0e 00 00 00 movl $0xe,(%eax)
109f6f: b8 ff ff ff ff mov $0xffffffff,%eax
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
109f74: 8d 65 f4 lea -0xc(%ebp),%esp
109f77: 5b pop %ebx
109f78: 5e pop %esi
109f79: 5f pop %edi
109f7a: c9 leave
109f7b: c3 ret
001083a8 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
1083a8: 55 push %ebp
1083a9: 89 e5 mov %esp,%ebp
1083ab: 56 push %esi
1083ac: 53 push %ebx
1083ad: 8b 75 08 mov 0x8(%ebp),%esi
void *return_this;
MSBUMP(malloc_calls, 1);
1083b0: ff 05 04 7d 12 00 incl 0x127d04
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
1083b6: e8 fd fe ff ff call 1082b8 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
1083bb: 85 f6 test %esi,%esi
1083bd: 74 5d je 10841c <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()) &&
1083bf: 83 3d e0 7f 12 00 03 cmpl $0x3,0x127fe0
1083c6: 74 48 je 108410 <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 );
1083c8: 6a 00 push $0x0
1083ca: 6a 00 push $0x0
1083cc: 56 push %esi
1083cd: ff 35 70 3a 12 00 pushl 0x123a70
1083d3: e8 6c 4d 00 00 call 10d144 <_Protected_heap_Allocate_aligned_with_boundary>
1083d8: 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 ) {
1083da: 83 c4 10 add $0x10,%esp
1083dd: 85 c0 test %eax,%eax
1083df: 74 47 je 108428 <malloc+0x80>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
1083e1: a1 b0 60 12 00 mov 0x1260b0,%eax
1083e6: 85 c0 test %eax,%eax
1083e8: 74 0a je 1083f4 <malloc+0x4c>
(*rtems_malloc_dirty_helper)( return_this, size );
1083ea: 83 ec 08 sub $0x8,%esp
1083ed: 56 push %esi
1083ee: 53 push %ebx
1083ef: ff d0 call *%eax
1083f1: 83 c4 10 add $0x10,%esp
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
1083f4: a1 a8 60 12 00 mov 0x1260a8,%eax
1083f9: 85 c0 test %eax,%eax
1083fb: 74 0a je 108407 <malloc+0x5f>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
1083fd: 83 ec 0c sub $0xc,%esp
108400: 53 push %ebx
108401: ff 50 04 call *0x4(%eax)
108404: 83 c4 10 add $0x10,%esp
return return_this;
}
108407: 89 d8 mov %ebx,%eax
108409: 8d 65 f8 lea -0x8(%ebp),%esp
10840c: 5b pop %ebx
10840d: 5e pop %esi
10840e: c9 leave
10840f: 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() )
108410: e8 63 fe ff ff call 108278 <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()) &&
108415: 84 c0 test %al,%al
108417: 75 af jne 1083c8 <malloc+0x20> <== ALWAYS TAKEN
108419: 8d 76 00 lea 0x0(%esi),%esi
!malloc_is_system_state_OK() )
return NULL;
10841c: 31 db xor %ebx,%ebx
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
10841e: 89 d8 mov %ebx,%eax
108420: 8d 65 f8 lea -0x8(%ebp),%esp
108423: 5b pop %ebx
108424: 5e pop %esi
108425: c9 leave
108426: c3 ret
108427: 90 nop
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
108428: a1 ac 60 12 00 mov 0x1260ac,%eax
10842d: 85 c0 test %eax,%eax
10842f: 74 12 je 108443 <malloc+0x9b>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
108431: 83 ec 0c sub $0xc,%esp
108434: 56 push %esi
108435: ff 50 04 call *0x4(%eax)
if ( !return_this ) {
108438: 83 c4 10 add $0x10,%esp
10843b: 85 c0 test %eax,%eax
10843d: 74 04 je 108443 <malloc+0x9b>
10843f: 89 c3 mov %eax,%ebx
108441: eb 9e jmp 1083e1 <malloc+0x39>
errno = ENOMEM;
108443: e8 9c ae 00 00 call 1132e4 <__errno>
108448: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
10844e: eb b7 jmp 108407 <malloc+0x5f>
0010832c <malloc_get_statistics>:
#include "malloc_p.h"
int malloc_get_statistics(
rtems_malloc_statistics_t *stats
)
{
10832c: 55 push %ebp
10832d: 89 e5 mov %esp,%ebp
10832f: 57 push %edi
108330: 56 push %esi
108331: 53 push %ebx
108332: 83 ec 0c sub $0xc,%esp
108335: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !stats )
108338: 85 db test %ebx,%ebx
10833a: 74 38 je 108374 <malloc_get_statistics+0x48>
return -1;
_RTEMS_Lock_allocator();
10833c: 83 ec 0c sub $0xc,%esp
10833f: ff 35 c0 7e 12 00 pushl 0x127ec0
108345: e8 9e 3c 00 00 call 10bfe8 <_API_Mutex_Lock>
*stats = rtems_malloc_statistics;
10834a: be c0 7c 12 00 mov $0x127cc0,%esi
10834f: b9 0b 00 00 00 mov $0xb,%ecx
108354: 89 df mov %ebx,%edi
108356: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_RTEMS_Unlock_allocator();
108358: 58 pop %eax
108359: ff 35 c0 7e 12 00 pushl 0x127ec0
10835f: e8 cc 3c 00 00 call 10c030 <_API_Mutex_Unlock>
return 0;
108364: 83 c4 10 add $0x10,%esp
108367: 31 c0 xor %eax,%eax
}
108369: 8d 65 f4 lea -0xc(%ebp),%esp
10836c: 5b pop %ebx
10836d: 5e pop %esi
10836e: 5f pop %edi
10836f: c9 leave
108370: c3 ret
108371: 8d 76 00 lea 0x0(%esi),%esi
int malloc_get_statistics(
rtems_malloc_statistics_t *stats
)
{
if ( !stats )
return -1;
108374: b8 ff ff ff ff mov $0xffffffff,%eax
_RTEMS_Lock_allocator();
*stats = rtems_malloc_statistics;
_RTEMS_Unlock_allocator();
return 0;
}
108379: 8d 65 f4 lea -0xc(%ebp),%esp
10837c: 5b pop %ebx
10837d: 5e pop %esi
10837e: 5f pop %edi
10837f: c9 leave
108380: c3 ret
0010874c <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
10874c: 55 push %ebp
10874d: 89 e5 mov %esp,%ebp
10874f: 56 push %esi
108750: 53 push %ebx
108751: 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;
108754: 8b 0d ac 75 12 00 mov 0x1275ac,%ecx
if ( sbrk_amount == 0 )
10875a: 85 c9 test %ecx,%ecx
10875c: 75 0a jne 108768 <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;
10875e: 31 c0 xor %eax,%eax
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
108760: 8d 65 f8 lea -0x8(%ebp),%esp
108763: 5b pop %ebx
108764: 5e pop %esi
108765: c9 leave
108766: c3 ret
108767: 90 nop
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
108768: 8d 04 0e lea (%esi,%ecx,1),%eax
10876b: 31 d2 xor %edx,%edx
10876d: f7 f1 div %ecx
10876f: 89 c3 mov %eax,%ebx
108771: 0f af d9 imul %ecx,%ebx
starting_address = (void *) sbrk(the_size);
108774: 83 ec 0c sub $0xc,%esp
108777: 53 push %ebx
108778: e8 df 7c ff ff call 10045c <sbrk>
if ( starting_address == (void*) -1 )
10877d: 83 c4 10 add $0x10,%esp
108780: 83 f8 ff cmp $0xffffffff,%eax
108783: 74 d9 je 10875e <malloc_sbrk_extend_and_allocate+0x12>
return (void *) 0;
if ( !_Protected_heap_Extend(
108785: 52 push %edx
108786: 53 push %ebx
108787: 50 push %eax
108788: ff 35 90 31 12 00 pushl 0x123190
10878e: e8 75 4d 00 00 call 10d508 <_Protected_heap_Extend>
108793: 83 c4 10 add $0x10,%esp
108796: 84 c0 test %al,%al
108798: 74 1b je 1087b5 <malloc_sbrk_extend_and_allocate+0x69>
sbrk(-the_size);
errno = ENOMEM;
return (void *) 0;
}
MSBUMP(space_available, the_size);
10879a: 01 1d 80 75 12 00 add %ebx,0x127580
1087a0: 6a 00 push $0x0
1087a2: 6a 00 push $0x0
1087a4: 56 push %esi
1087a5: ff 35 90 31 12 00 pushl 0x123190
1087ab: e8 20 4d 00 00 call 10d4d0 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
1087b0: 83 c4 10 add $0x10,%esp
1087b3: eb ab jmp 108760 <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);
1087b5: 83 ec 0c sub $0xc,%esp
1087b8: f7 db neg %ebx
1087ba: 53 push %ebx
1087bb: e8 9c 7c ff ff call 10045c <sbrk>
errno = ENOMEM;
1087c0: e8 93 b1 00 00 call 113958 <__errno>
1087c5: c7 00 0c 00 00 00 movl $0xc,(%eax)
return (void *) 0;
1087cb: 83 c4 10 add $0x10,%esp
1087ce: 31 c0 xor %eax,%eax
1087d0: eb 8e jmp 108760 <malloc_sbrk_extend_and_allocate+0x14>
00111e98 <memfile_free_blocks_in_table>:
*/
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
111e98: 55 push %ebp
111e99: 89 e5 mov %esp,%ebp
111e9b: 57 push %edi
111e9c: 56 push %esi
111e9d: 53 push %ebx
111e9e: 83 ec 0c sub $0xc,%esp
111ea1: 8b 7d 0c mov 0xc(%ebp),%edi
IMFS_assert( block_table );
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
111ea4: 8b 45 08 mov 0x8(%ebp),%eax
111ea7: 8b 30 mov (%eax),%esi
for ( i=0 ; i<entries ; i++ ) {
111ea9: 85 ff test %edi,%edi
111eab: 7e 27 jle 111ed4 <memfile_free_blocks_in_table+0x3c><== NEVER TAKEN
111ead: 31 db xor %ebx,%ebx
111eaf: 90 nop
if ( b[i] ) {
111eb0: 8b 04 9e mov (%esi,%ebx,4),%eax
111eb3: 85 c0 test %eax,%eax
111eb5: 74 13 je 111eca <memfile_free_blocks_in_table+0x32>
memfile_free_block( b[i] );
111eb7: 83 ec 0c sub $0xc,%esp
111eba: 50 push %eax
111ebb: e8 bc ff ff ff call 111e7c <memfile_free_block>
b[i] = 0;
111ec0: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4)
111ec7: 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++ ) {
111eca: 43 inc %ebx
111ecb: 39 df cmp %ebx,%edi
111ecd: 7f e1 jg 111eb0 <memfile_free_blocks_in_table+0x18>
111ecf: 8b 45 08 mov 0x8(%ebp),%eax
111ed2: 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 );
111ed4: 83 ec 0c sub $0xc,%esp
111ed7: 56 push %esi
111ed8: e8 9f ff ff ff call 111e7c <memfile_free_block>
*block_table = 0;
111edd: 8b 45 08 mov 0x8(%ebp),%eax
111ee0: c7 00 00 00 00 00 movl $0x0,(%eax)
111ee6: 83 c4 10 add $0x10,%esp
}
111ee9: 8d 65 f4 lea -0xc(%ebp),%esp
111eec: 5b pop %ebx
111eed: 5e pop %esi
111eee: 5f pop %edi
111eef: c9 leave
111ef0: c3 ret
00112414 <memfile_ftruncate>:
*/
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
112414: 55 push %ebp
112415: 89 e5 mov %esp,%ebp
112417: 53 push %ebx
112418: 83 ec 14 sub $0x14,%esp
11241b: 8b 4d 08 mov 0x8(%ebp),%ecx
11241e: 8b 45 0c mov 0xc(%ebp),%eax
112421: 8b 55 10 mov 0x10(%ebp),%edx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
112424: 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 )
112427: 39 53 54 cmp %edx,0x54(%ebx)
11242a: 7f 19 jg 112445 <memfile_ftruncate+0x31><== NEVER TAKEN
11242c: 7d 12 jge 112440 <memfile_ftruncate+0x2c><== ALWAYS TAKEN
return IMFS_memfile_extend( the_jnode, length );
11242e: 51 push %ecx
11242f: 52 push %edx
112430: 50 push %eax
112431: 53 push %ebx
112432: e8 45 fc ff ff call 11207c <IMFS_memfile_extend>
112437: 83 c4 10 add $0x10,%esp
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
return 0;
}
11243a: 8b 5d fc mov -0x4(%ebp),%ebx
11243d: c9 leave
11243e: c3 ret
11243f: 90 nop
* 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 )
112440: 39 43 50 cmp %eax,0x50(%ebx)
112443: 72 e9 jb 11242e <memfile_ftruncate+0x1a>
/*
* 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;
112445: 89 43 50 mov %eax,0x50(%ebx)
112448: 89 53 54 mov %edx,0x54(%ebx)
iop->size = the_jnode->info.file.size;
11244b: 89 41 04 mov %eax,0x4(%ecx)
11244e: 89 51 08 mov %edx,0x8(%ecx)
IMFS_update_atime( the_jnode );
112451: 83 ec 08 sub $0x8,%esp
112454: 6a 00 push $0x0
112456: 8d 45 f0 lea -0x10(%ebp),%eax
112459: 50 push %eax
11245a: e8 f1 5c ff ff call 108150 <gettimeofday>
11245f: 8b 45 f0 mov -0x10(%ebp),%eax
112462: 89 43 40 mov %eax,0x40(%ebx)
return 0;
112465: 83 c4 10 add $0x10,%esp
112468: 31 c0 xor %eax,%eax
}
11246a: 8b 5d fc mov -0x4(%ebp),%ebx
11246d: c9 leave
11246e: c3 ret
00112470 <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
112470: 55 push %ebp
112471: 89 e5 mov %esp,%ebp
112473: 57 push %edi
112474: 56 push %esi
112475: 53 push %ebx
112476: 83 ec 0c sub $0xc,%esp
112479: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
11247c: 8b 73 18 mov 0x18(%ebx),%esi
if (the_jnode->type == IMFS_LINEAR_FILE) {
11247f: 83 7e 4c 06 cmpl $0x6,0x4c(%esi)
112483: 74 2f je 1124b4 <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 ))
112485: 57 push %edi
112486: ff 73 10 pushl 0x10(%ebx)
112489: ff 73 0c pushl 0xc(%ebx)
11248c: 56 push %esi
11248d: e8 ea fb ff ff call 11207c <IMFS_memfile_extend>
112492: 83 c4 10 add $0x10,%esp
112495: 85 c0 test %eax,%eax
112497: 75 45 jne 1124de <memfile_lseek+0x6e>
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
112499: 8b 46 50 mov 0x50(%esi),%eax
11249c: 8b 56 54 mov 0x54(%esi),%edx
11249f: 89 43 04 mov %eax,0x4(%ebx)
1124a2: 89 53 08 mov %edx,0x8(%ebx)
1124a5: 8b 43 0c mov 0xc(%ebx),%eax
1124a8: 8b 53 10 mov 0x10(%ebx),%edx
}
return iop->offset;
}
1124ab: 8d 65 f4 lea -0xc(%ebp),%esp
1124ae: 5b pop %ebx
1124af: 5e pop %esi
1124b0: 5f pop %edi
1124b1: c9 leave
1124b2: c3 ret
1124b3: 90 nop
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)
1124b4: 8b 43 0c mov 0xc(%ebx),%eax
1124b7: 8b 53 10 mov 0x10(%ebx),%edx
1124ba: 8b 7e 50 mov 0x50(%esi),%edi
1124bd: 8b 4e 54 mov 0x54(%esi),%ecx
1124c0: 39 ca cmp %ecx,%edx
1124c2: 7c e7 jl 1124ab <memfile_lseek+0x3b> <== NEVER TAKEN
1124c4: 7e 12 jle 1124d8 <memfile_lseek+0x68> <== ALWAYS TAKEN
iop->offset = the_jnode->info.linearfile.size;
1124c6: 89 7b 0c mov %edi,0xc(%ebx) <== NOT EXECUTED
1124c9: 89 4b 10 mov %ecx,0x10(%ebx) <== NOT EXECUTED
1124cc: 89 f8 mov %edi,%eax <== NOT EXECUTED
1124ce: 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;
}
1124d0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1124d3: 5b pop %ebx <== NOT EXECUTED
1124d4: 5e pop %esi <== NOT EXECUTED
1124d5: 5f pop %edi <== NOT EXECUTED
1124d6: c9 leave <== NOT EXECUTED
1124d7: 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)
1124d8: 39 f8 cmp %edi,%eax
1124da: 76 cf jbe 1124ab <memfile_lseek+0x3b> <== ALWAYS TAKEN
1124dc: eb e8 jmp 1124c6 <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 );
1124de: e8 01 0e 00 00 call 1132e4 <__errno>
1124e3: c7 00 1c 00 00 00 movl $0x1c,(%eax)
1124e9: b8 ff ff ff ff mov $0xffffffff,%eax
1124ee: ba ff ff ff ff mov $0xffffffff,%edx
1124f3: eb b6 jmp 1124ab <memfile_lseek+0x3b>
0011236c <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
11236c: 55 push %ebp
11236d: 89 e5 mov %esp,%ebp
11236f: 56 push %esi
112370: 53 push %ebx
112371: 8b 5d 08 mov 0x8(%ebp),%ebx
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
112374: 8b 73 18 mov 0x18(%ebx),%esi
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
112377: 8b 43 14 mov 0x14(%ebx),%eax
11237a: a9 04 02 00 00 test $0x204,%eax
11237f: 74 06 je 112387 <memfile_open+0x1b>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
112381: 83 7e 4c 06 cmpl $0x6,0x4c(%esi)
112385: 74 2d je 1123b4 <memfile_open+0x48> <== NEVER TAKEN
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
112387: 8b 56 50 mov 0x50(%esi),%edx
11238a: 8b 4e 54 mov 0x54(%esi),%ecx
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
11238d: f6 c4 02 test $0x2,%ah
112390: 75 12 jne 1123a4 <memfile_open+0x38>
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
112392: 89 53 04 mov %edx,0x4(%ebx)
112395: 89 4b 08 mov %ecx,0x8(%ebx)
return 0;
112398: 31 c0 xor %eax,%eax
}
11239a: 8d 65 f8 lea -0x8(%ebp),%esp
11239d: 5b pop %ebx
11239e: 5e pop %esi
11239f: c9 leave
1123a0: c3 ret
1123a1: 8d 76 00 lea 0x0(%esi),%esi
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;
1123a4: 89 53 0c mov %edx,0xc(%ebx)
1123a7: 89 4b 10 mov %ecx,0x10(%ebx)
1123aa: 8b 56 50 mov 0x50(%esi),%edx
1123ad: 8b 4e 54 mov 0x54(%esi),%ecx
1123b0: eb e0 jmp 112392 <memfile_open+0x26>
1123b2: 66 90 xchg %ax,%ax
/*
* 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;
1123b4: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
1123b7: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
1123ba: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED
the_jnode->info.file.size = 0;
1123c1: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED
1123c8: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
1123cf: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
1123d6: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
1123dd: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED
if ((count != 0)
1123e4: 85 c0 test %eax,%eax <== NOT EXECUTED
1123e6: 75 09 jne 1123f1 <memfile_open+0x85> <== NOT EXECUTED
1123e8: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
1123eb: 31 d2 xor %edx,%edx <== NOT EXECUTED
1123ed: 31 c9 xor %ecx,%ecx <== NOT EXECUTED
1123ef: eb 9c jmp 11238d <memfile_open+0x21> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
1123f1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1123f4: 50 push %eax <== NOT EXECUTED
1123f5: 52 push %edx <== NOT EXECUTED
1123f6: 6a 00 push $0x0 <== NOT EXECUTED
1123f8: 6a 00 push $0x0 <== NOT EXECUTED
1123fa: 56 push %esi <== NOT EXECUTED
1123fb: e8 94 fd ff ff call 112194 <IMFS_memfile_write> <== NOT EXECUTED
112400: 83 c4 20 add $0x20,%esp <== NOT EXECUTED
112403: 40 inc %eax <== NOT EXECUTED
112404: 74 08 je 11240e <memfile_open+0xa2> <== NOT EXECUTED
112406: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
112409: e9 79 ff ff ff jmp 112387 <memfile_open+0x1b> <== NOT EXECUTED
return -1;
11240e: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED
112411: eb 87 jmp 11239a <memfile_open+0x2e> <== NOT EXECUTED
0010846c <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
10846c: 55 push %ebp
10846d: 89 e5 mov %esp,%ebp
10846f: 57 push %edi
108470: 56 push %esi
108471: 53 push %ebx
108472: 83 ec 3c sub $0x3c,%esp
108475: 8b 7d 08 mov 0x8(%ebp),%edi
108478: 8b 5d 0c mov 0xc(%ebp),%ebx
10847b: 8b 55 10 mov 0x10(%ebp),%edx
10847e: 8b 4d 14 mov 0x14(%ebp),%ecx
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
108481: 89 d8 mov %ebx,%eax
108483: 25 00 f0 00 00 and $0xf000,%eax
108488: 3d 00 40 00 00 cmp $0x4000,%eax
10848d: 74 39 je 1084c8 <mknod+0x5c>
10848f: 76 27 jbe 1084b8 <mknod+0x4c>
108491: 3d 00 60 00 00 cmp $0x6000,%eax
108496: 74 30 je 1084c8 <mknod+0x5c>
108498: 3d 00 80 00 00 cmp $0x8000,%eax
10849d: 74 29 je 1084c8 <mknod+0x5c> <== ALWAYS TAKEN
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10849f: e8 40 ae 00 00 call 1132e4 <__errno>
1084a4: c7 00 16 00 00 00 movl $0x16,(%eax)
1084aa: 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;
}
1084af: 8d 65 f4 lea -0xc(%ebp),%esp
1084b2: 5b pop %ebx
1084b3: 5e pop %esi
1084b4: 5f pop %edi
1084b5: c9 leave
1084b6: c3 ret
1084b7: 90 nop
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
1084b8: 3d 00 10 00 00 cmp $0x1000,%eax
1084bd: 74 09 je 1084c8 <mknod+0x5c>
1084bf: 3d 00 20 00 00 cmp $0x2000,%eax
1084c4: 75 d9 jne 10849f <mknod+0x33>
1084c6: 66 90 xchg %ax,%ax
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
1084c8: 50 push %eax
1084c9: 8d 75 cc lea -0x34(%ebp),%esi
1084cc: 56 push %esi
1084cd: 8d 45 e4 lea -0x1c(%ebp),%eax
1084d0: 50 push %eax
1084d1: 57 push %edi
1084d2: 89 55 c4 mov %edx,-0x3c(%ebp)
1084d5: 89 4d c0 mov %ecx,-0x40(%ebp)
1084d8: e8 1f 0a 00 00 call 108efc <rtems_filesystem_get_start_loc>
result = (*temp_loc.ops->evalformake_h)(
1084dd: 83 c4 0c add $0xc,%esp
1084e0: 8d 45 e0 lea -0x20(%ebp),%eax
1084e3: 50 push %eax
1084e4: 56 push %esi
1084e5: 03 7d e4 add -0x1c(%ebp),%edi
1084e8: 57 push %edi
1084e9: 8b 45 d8 mov -0x28(%ebp),%eax
1084ec: ff 50 04 call *0x4(%eax)
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
1084ef: 83 c4 10 add $0x10,%esp
1084f2: 85 c0 test %eax,%eax
1084f4: 8b 55 c4 mov -0x3c(%ebp),%edx
1084f7: 8b 4d c0 mov -0x40(%ebp),%ecx
1084fa: 74 10 je 10850c <mknod+0xa0>
return -1;
1084fc: 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;
}
108501: 8d 65 f4 lea -0xc(%ebp),%esp
108504: 5b pop %ebx
108505: 5e pop %esi
108506: 5f pop %edi
108507: c9 leave
108508: c3 ret
108509: 8d 76 00 lea 0x0(%esi),%esi
&name_start
);
if ( result != 0 )
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
10850c: 83 ec 0c sub $0xc,%esp
10850f: 56 push %esi
108510: 51 push %ecx
108511: 52 push %edx
108512: 53 push %ebx
108513: ff 75 e0 pushl -0x20(%ebp)
108516: 8b 45 d8 mov -0x28(%ebp),%eax
108519: ff 50 14 call *0x14(%eax)
rtems_filesystem_freenode( &temp_loc );
10851c: 83 c4 14 add $0x14,%esp
10851f: 56 push %esi
108520: 89 45 c4 mov %eax,-0x3c(%ebp)
108523: e8 98 fb ff ff call 1080c0 <rtems_filesystem_freenode>
return result;
108528: 83 c4 10 add $0x10,%esp
10852b: 8b 45 c4 mov -0x3c(%ebp),%eax
}
10852e: 8d 65 f4 lea -0xc(%ebp),%esp
108531: 5b pop %ebx
108532: 5e pop %esi
108533: 5f pop %edi
108534: c9 leave
108535: c3 ret
001085bc <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
1085bc: 55 push %ebp
1085bd: 89 e5 mov %esp,%ebp
1085bf: 57 push %edi
1085c0: 56 push %esi
1085c1: 53 push %ebx
1085c2: 83 ec 4c sub $0x4c,%esp
1085c5: 8b 75 10 mov 0x10(%ebp),%esi
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
1085c8: 83 7d 14 01 cmpl $0x1,0x14(%ebp)
1085cc: 0f 87 36 02 00 00 ja 108808 <mount+0x24c>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
1085d2: 83 ec 0c sub $0xc,%esp
1085d5: 56 push %esi
1085d6: e8 31 7b 00 00 call 11010c <rtems_filesystem_get_mount_handler>
1085db: 89 45 b8 mov %eax,-0x48(%ebp)
if ( !mount_h )
1085de: 83 c4 10 add $0x10,%esp
1085e1: 85 c0 test %eax,%eax
1085e3: 0f 84 1f 02 00 00 je 108808 <mount+0x24c>
{
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;
1085e9: 8b 45 0c mov 0xc(%ebp),%eax
1085ec: 85 c0 test %eax,%eax
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
1085ee: 0f 95 45 b7 setne -0x49(%ebp)
1085f2: 0f 84 e8 01 00 00 je 1087e0 <mount+0x224>
* 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(
1085f8: 31 c0 xor %eax,%eax
1085fa: b9 ff ff ff ff mov $0xffffffff,%ecx
1085ff: 8b 7d 0c mov 0xc(%ebp),%edi
108602: f2 ae repnz scas %es:(%edi),%al
108604: f7 d1 not %ecx
108606: 8d 41 ff lea -0x1(%ecx),%eax
108609: 89 45 ac mov %eax,-0x54(%ebp)
10860c: 89 4d bc mov %ecx,-0x44(%ebp)
10860f: 8b 55 0c mov 0xc(%ebp),%edx
108612: 89 55 b0 mov %edx,-0x50(%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;
108615: ba ff ff ff ff mov $0xffffffff,%edx
10861a: 31 c0 xor %eax,%eax
10861c: 89 d1 mov %edx,%ecx
10861e: 89 f7 mov %esi,%edi
108620: f2 ae repnz scas %es:(%edi),%al
108622: f7 d1 not %ecx
108624: 89 4d c4 mov %ecx,-0x3c(%ebp)
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
108627: 8b 7d 08 mov 0x8(%ebp),%edi
10862a: 85 ff test %edi,%edi
10862c: 0f 84 ca 01 00 00 je 1087fc <mount+0x240>
108632: 89 d1 mov %edx,%ecx
108634: 8b 7d 08 mov 0x8(%ebp),%edi
108637: f2 ae repnz scas %es:(%edi),%al
108639: f7 d1 not %ecx
10863b: 89 4d c0 mov %ecx,-0x40(%ebp)
size_t target_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
10863e: 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_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_size;
108641: 8b 55 bc mov -0x44(%ebp),%edx
108644: 8b 7d c4 mov -0x3c(%ebp),%edi
108647: 8d 44 3a 74 lea 0x74(%edx,%edi,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_size = strlen( target ) + 1;
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
10864b: 03 45 c0 add -0x40(%ebp),%eax
+ filesystemtype_size + source_size + target_size;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
10864e: 50 push %eax
10864f: 6a 01 push $0x1
108651: e8 ee f8 ff ff call 107f44 <calloc>
108656: 89 c3 mov %eax,%ebx
if ( mt_entry != NULL ) {
108658: 83 c4 10 add $0x10,%esp
10865b: 85 c0 test %eax,%eax
10865d: 0f 84 65 01 00 00 je 1087c8 <mount+0x20c> <== NEVER TAKEN
char *str = (char *) mt_entry + sizeof( *mt_entry );
108663: 8d 40 74 lea 0x74(%eax),%eax
memcpy( str, filesystemtype, filesystemtype_size );
108666: 89 c7 mov %eax,%edi
108668: 8b 4d c4 mov -0x3c(%ebp),%ecx
10866b: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10866d: 89 fa mov %edi,%edx
mt_entry->type = str;
10866f: 89 43 6c mov %eax,0x6c(%ebx)
str += filesystemtype_size;
memcpy( str, source_or_null, source_size );
108672: 8b 75 08 mov 0x8(%ebp),%esi
108675: 8b 4d c0 mov -0x40(%ebp),%ecx
108678: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
10867a: 89 f8 mov %edi,%eax
mt_entry->dev = str;
10867c: 89 53 70 mov %edx,0x70(%ebx)
str += source_size;
memcpy( str, target, target_size );
10867f: 8b 75 b0 mov -0x50(%ebp),%esi
108682: 8b 4d bc mov -0x44(%ebp),%ecx
108685: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
mt_entry->target = str;
108687: 89 43 68 mov %eax,0x68(%ebx)
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
10868a: 89 5b 2c mov %ebx,0x2c(%ebx)
mt_entry->options = options;
10868d: 8b 45 14 mov 0x14(%ebp),%eax
108690: 89 43 30 mov %eax,0x30(%ebx)
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
108693: 8d 7b 38 lea 0x38(%ebx),%edi
108696: be 20 14 12 00 mov $0x121420,%esi
10869b: b1 0c mov $0xc,%cl
10869d: 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 ) {
10869f: 80 7d b7 00 cmpb $0x0,-0x49(%ebp)
1086a3: 0f 85 83 00 00 00 jne 10872c <mount+0x170>
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
1086a9: 81 3d 24 59 12 00 28 cmpl $0x125928,0x125924
1086b0: 59 12 00
1086b3: 0f 85 67 01 00 00 jne 108820 <mount+0x264> <== 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;
1086b9: 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 ) ) {
1086bb: 83 ec 08 sub $0x8,%esp
1086be: ff 75 18 pushl 0x18(%ebp)
1086c1: 53 push %ebx
1086c2: ff 55 b8 call *-0x48(%ebp)
1086c5: 83 c4 10 add $0x10,%esp
1086c8: 85 c0 test %eax,%eax
1086ca: 0f 85 74 01 00 00 jne 108844 <mount+0x288>
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 );
1086d0: 56 push %esi
1086d1: 6a 00 push $0x0
1086d3: 6a 00 push $0x0
1086d5: ff 35 e8 7c 12 00 pushl 0x127ce8
1086db: e8 18 30 00 00 call 10b6f8 <rtems_semaphore_obtain>
1086e0: 5a pop %edx
1086e1: 59 pop %ecx
1086e2: 53 push %ebx
1086e3: 68 24 59 12 00 push $0x125924
1086e8: e8 33 39 00 00 call 10c020 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
1086ed: 58 pop %eax
1086ee: ff 35 e8 7c 12 00 pushl 0x127ce8
1086f4: e8 fb 30 00 00 call 10b7f4 <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
1086f9: 83 c4 10 add $0x10,%esp
1086fc: 80 7d b7 00 cmpb $0x0,-0x49(%ebp)
108700: 74 0a je 10870c <mount+0x150>
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
108702: 31 c0 xor %eax,%eax
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
108704: 8d 65 f4 lea -0xc(%ebp),%esp
108707: 5b pop %ebx
108708: 5e pop %esi
108709: 5f pop %edi
10870a: c9 leave
10870b: c3 ret
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;
10870c: 8b 3d 50 5a 12 00 mov 0x125a50,%edi
108712: 83 c7 18 add $0x18,%edi
108715: 8d 73 1c lea 0x1c(%ebx),%esi
108718: b9 05 00 00 00 mov $0x5,%ecx
10871d: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
10871f: 31 c0 xor %eax,%eax
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
108721: 8d 65 f4 lea -0xc(%ebp),%esp
108724: 5b pop %ebx
108725: 5e pop %esi
108726: 5f pop %edi
108727: c9 leave
108728: c3 ret
108729: 8d 76 00 lea 0x0(%esi),%esi
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
10872c: 83 ec 0c sub $0xc,%esp
10872f: 6a 01 push $0x1
108731: 8d 75 d4 lea -0x2c(%ebp),%esi
108734: 56 push %esi
108735: 6a 07 push $0x7
108737: ff 75 ac pushl -0x54(%ebp)
10873a: ff 75 0c pushl 0xc(%ebp)
10873d: e8 a6 f8 ff ff call 107fe8 <rtems_filesystem_evaluate_path>
108742: 83 c4 20 add $0x20,%esp
108745: 40 inc %eax
108746: 0f 84 df 00 00 00 je 10882b <mount+0x26f> <== NEVER TAKEN
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
10874c: 83 ec 0c sub $0xc,%esp
10874f: 56 push %esi
108750: 8b 45 e0 mov -0x20(%ebp),%eax
108753: ff 50 10 call *0x10(%eax)
108756: 83 c4 10 add $0x10,%esp
108759: 48 dec %eax
10875a: 0f 85 0c 01 00 00 jne 10886c <mount+0x2b0>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
108760: 83 ec 08 sub $0x8,%esp
108763: ff 75 d4 pushl -0x2c(%ebp)
108766: 68 38 85 10 00 push $0x108538
10876b: e8 dc fd ff ff call 10854c <rtems_filesystem_mount_iterate>
108770: 83 c4 10 add $0x10,%esp
108773: 84 c0 test %al,%al
108775: 0f 85 01 01 00 00 jne 10887c <mount+0x2c0>
* 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;
10877b: 8b 45 d4 mov -0x2c(%ebp),%eax
10877e: 89 43 08 mov %eax,0x8(%ebx)
mt_entry->mt_point_node.handlers = loc.handlers;
108781: 8b 45 dc mov -0x24(%ebp),%eax
108784: 89 43 10 mov %eax,0x10(%ebx)
mt_entry->mt_point_node.ops = loc.ops;
108787: 8b 45 e0 mov -0x20(%ebp),%eax
10878a: 89 43 14 mov %eax,0x14(%ebx)
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
10878d: 8b 55 e4 mov -0x1c(%ebp),%edx
108790: 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 ) ) {
108793: 83 ec 0c sub $0xc,%esp
108796: 53 push %ebx
108797: ff 50 20 call *0x20(%eax)
10879a: 83 c4 10 add $0x10,%esp
10879d: 85 c0 test %eax,%eax
10879f: 0f 84 16 ff ff ff je 1086bb <mount+0xff> <== ALWAYS TAKEN
return 0;
cleanup_and_bail:
free( mt_entry );
1087a5: 83 ec 0c sub $0xc,%esp
1087a8: 53 push %ebx
1087a9: e8 26 f9 ff ff call 1080d4 <free>
1087ae: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
1087b1: 83 ec 0c sub $0xc,%esp
1087b4: 56 push %esi
1087b5: e8 06 f9 ff ff call 1080c0 <rtems_filesystem_freenode>
1087ba: 83 c4 10 add $0x10,%esp
return -1;
1087bd: b8 ff ff ff ff mov $0xffffffff,%eax
1087c2: e9 3d ff ff ff jmp 108704 <mount+0x148>
1087c7: 90 nop
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
1087c8: e8 17 ab 00 00 call 1132e4 <__errno> <== NOT EXECUTED
1087cd: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED
1087d3: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
1087d8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
1087db: 5b pop %ebx <== NOT EXECUTED
1087dc: 5e pop %esi <== NOT EXECUTED
1087dd: 5f pop %edi <== NOT EXECUTED
1087de: c9 leave <== NOT EXECUTED
1087df: 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 : "/";
1087e0: c7 45 bc 02 00 00 00 movl $0x2,-0x44(%ebp)
1087e7: c7 45 ac 01 00 00 00 movl $0x1,-0x54(%ebp)
1087ee: c7 45 b0 c7 13 12 00 movl $0x1213c7,-0x50(%ebp)
1087f5: e9 1b fe ff ff jmp 108615 <mount+0x59>
1087fa: 66 90 xchg %ax,%ax
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
1087fc: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp)
108803: e9 36 fe ff ff jmp 10863e <mount+0x82>
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
108808: e8 d7 aa 00 00 call 1132e4 <__errno>
10880d: c7 00 16 00 00 00 movl $0x16,(%eax)
108813: b8 ff ff ff ff mov $0xffffffff,%eax
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
108818: 8d 65 f4 lea -0xc(%ebp),%esp
10881b: 5b pop %ebx
10881c: 5e pop %esi
10881d: 5f pop %edi
10881e: c9 leave
10881f: c3 ret
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
108820: e8 bf aa 00 00 call 1132e4 <__errno> <== NOT EXECUTED
108825: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
10882b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10882e: 53 push %ebx <== NOT EXECUTED
10882f: e8 a0 f8 ff ff call 1080d4 <free> <== NOT EXECUTED
108834: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
108837: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
10883c: e9 c3 fe ff ff jmp 108704 <mount+0x148> <== NOT EXECUTED
108841: 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 );
108844: 83 ec 0c sub $0xc,%esp
108847: 53 push %ebx
108848: 8b 45 e0 mov -0x20(%ebp),%eax
10884b: ff 50 28 call *0x28(%eax)
return 0;
cleanup_and_bail:
free( mt_entry );
10884e: 89 1c 24 mov %ebx,(%esp)
108851: e8 7e f8 ff ff call 1080d4 <free>
if ( loc_to_free )
108856: 83 c4 10 add $0x10,%esp
108859: 85 f6 test %esi,%esi
10885b: 0f 85 50 ff ff ff jne 1087b1 <mount+0x1f5> <== ALWAYS TAKEN
rtems_filesystem_freenode( loc_to_free );
return -1;
108861: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
108866: e9 99 fe ff ff jmp 108704 <mount+0x148> <== NOT EXECUTED
10886b: 90 nop <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
10886c: e8 73 aa 00 00 call 1132e4 <__errno>
108871: c7 00 14 00 00 00 movl $0x14,(%eax)
goto cleanup_and_bail;
108877: e9 29 ff ff ff jmp 1087a5 <mount+0x1e9>
/*
* 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;
10887c: e8 63 aa 00 00 call 1132e4 <__errno>
108881: c7 00 10 00 00 00 movl $0x10,(%eax)
goto cleanup_and_bail;
108887: e9 19 ff ff ff jmp 1087a5 <mount+0x1e9>
00108bd0 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
108bd0: 55 push %ebp
108bd1: 89 e5 mov %esp,%ebp
108bd3: 57 push %edi
108bd4: 56 push %esi
108bd5: 53 push %ebx
108bd6: 83 ec 1c sub $0x1c,%esp
108bd9: 8b 45 08 mov 0x8(%ebp),%eax
108bdc: 89 45 e4 mov %eax,-0x1c(%ebp)
108bdf: 8b 5d 0c mov 0xc(%ebp),%ebx
108be2: 8b 75 10 mov 0x10(%ebp),%esi
108be5: 8b 7d 14 mov 0x14(%ebp),%edi
108be8: 8b 45 18 mov 0x18(%ebp),%eax
108beb: 89 45 e0 mov %eax,-0x20(%ebp)
int rv = -1;
if (target != NULL) {
108bee: 85 db test %ebx,%ebx
108bf0: 74 3f je 108c31 <mount_and_make_target_path+0x61>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
108bf2: 83 ec 08 sub $0x8,%esp
108bf5: 68 ff 01 00 00 push $0x1ff
108bfa: 53 push %ebx
108bfb: e8 08 0a 00 00 call 109608 <rtems_mkdir>
if (rv == 0) {
108c00: 83 c4 10 add $0x10,%esp
108c03: 85 c0 test %eax,%eax
108c05: 74 09 je 108c10 <mount_and_make_target_path+0x40><== ALWAYS TAKEN
} else {
errno = EINVAL;
}
return rv;
}
108c07: 8d 65 f4 lea -0xc(%ebp),%esp
108c0a: 5b pop %ebx
108c0b: 5e pop %esi
108c0c: 5f pop %edi
108c0d: c9 leave
108c0e: c3 ret
108c0f: 90 nop
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
108c10: 8b 45 e0 mov -0x20(%ebp),%eax
108c13: 89 45 18 mov %eax,0x18(%ebp)
108c16: 89 7d 14 mov %edi,0x14(%ebp)
108c19: 89 75 10 mov %esi,0x10(%ebp)
108c1c: 89 5d 0c mov %ebx,0xc(%ebp)
108c1f: 8b 45 e4 mov -0x1c(%ebp),%eax
108c22: 89 45 08 mov %eax,0x8(%ebp)
} else {
errno = EINVAL;
}
return rv;
}
108c25: 8d 65 f4 lea -0xc(%ebp),%esp
108c28: 5b pop %ebx
108c29: 5e pop %esi
108c2a: 5f pop %edi
108c2b: c9 leave
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
108c2c: e9 97 00 00 00 jmp 108cc8 <mount>
options,
data
);
}
} else {
errno = EINVAL;
108c31: e8 92 ad 00 00 call 1139c8 <__errno>
108c36: c7 00 16 00 00 00 movl $0x16,(%eax)
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
108c3c: b8 ff ff ff ff mov $0xffffffff,%eax
108c41: eb c4 jmp 108c07 <mount_and_make_target_path+0x37>
0010fb5c <mq_open>:
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
10fb5c: 55 push %ebp
10fb5d: 89 e5 mov %esp,%ebp
10fb5f: 57 push %edi
10fb60: 56 push %esi
10fb61: 53 push %ebx
10fb62: 83 ec 2c sub $0x2c,%esp
10fb65: 8b 75 0c mov 0xc(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10fb68: a1 90 0f 13 00 mov 0x130f90,%eax
10fb6d: 40 inc %eax
10fb6e: a3 90 0f 13 00 mov %eax,0x130f90
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10fb73: 89 f0 mov %esi,%eax
10fb75: 25 00 02 00 00 and $0x200,%eax
10fb7a: 89 45 d4 mov %eax,-0x2c(%ebp)
10fb7d: 0f 85 c9 00 00 00 jne 10fc4c <mq_open+0xf0>
/* struct mq_attr attr */
)
{
va_list arg;
mode_t mode;
struct mq_attr *attr = NULL;
10fb83: 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 );
10fb8a: 83 ec 0c sub $0xc,%esp
10fb8d: 68 c0 14 13 00 push $0x1314c0
10fb92: e8 55 2c 00 00 call 1127ec <_Objects_Allocate>
10fb97: 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 ) {
10fb99: 83 c4 10 add $0x10,%esp
10fb9c: 85 c0 test %eax,%eax
10fb9e: 0f 84 b4 00 00 00 je 10fc58 <mq_open+0xfc>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
10fba4: 89 70 14 mov %esi,0x14(%eax)
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
10fba7: 83 ec 08 sub $0x8,%esp
10fbaa: 8d 45 e4 lea -0x1c(%ebp),%eax
10fbad: 50 push %eax
10fbae: ff 75 08 pushl 0x8(%ebp)
10fbb1: e8 ca 69 00 00 call 116580 <_POSIX_Message_queue_Name_to_id>
10fbb6: 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 ) {
10fbb8: 83 c4 10 add $0x10,%esp
10fbbb: 85 c0 test %eax,%eax
10fbbd: 75 59 jne 10fc18 <mq_open+0xbc>
} else { /* name -> ID translation succeeded */
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10fbbf: 81 e6 00 0a 00 00 and $0xa00,%esi
10fbc5: 81 fe 00 0a 00 00 cmp $0xa00,%esi
10fbcb: 0f 84 a7 00 00 00 je 10fc78 <mq_open+0x11c>
Objects_Id id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control *)
_Objects_Get( &_POSIX_Message_queue_Information, id, location );
10fbd1: 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 );
10fbd2: 8d 45 dc lea -0x24(%ebp),%eax
10fbd5: 50 push %eax
10fbd6: ff 75 e4 pushl -0x1c(%ebp)
10fbd9: 68 20 13 13 00 push $0x131320
10fbde: e8 bd 30 00 00 call 112ca0 <_Objects_Get>
10fbe3: 89 45 e0 mov %eax,-0x20(%ebp)
the_mq->open_count += 1;
10fbe6: ff 40 18 incl 0x18(%eax)
the_mq_fd->Queue = the_mq;
10fbe9: 89 43 10 mov %eax,0x10(%ebx)
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
10fbec: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10fbf0: a1 dc 14 13 00 mov 0x1314dc,%eax
10fbf5: 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;
10fbf8: 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();
10fbff: e8 a4 3c 00 00 call 1138a8 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10fc04: e8 9f 3c 00 00 call 1138a8 <_Thread_Enable_dispatch>
return (mqd_t)the_mq_fd->Object.id;
10fc09: 8b 43 08 mov 0x8(%ebx),%eax
10fc0c: 83 c4 10 add $0x10,%esp
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10fc0f: 8d 65 f4 lea -0xc(%ebp),%esp
10fc12: 5b pop %ebx
10fc13: 5e pop %esi
10fc14: 5f pop %edi
10fc15: c9 leave
10fc16: c3 ret
10fc17: 90 nop
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) ) ) {
10fc18: 83 f8 02 cmp $0x2,%eax
10fc1b: 0f 84 87 00 00 00 je 10fca8 <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 );
10fc21: 83 ec 08 sub $0x8,%esp
10fc24: 53 push %ebx
10fc25: 68 c0 14 13 00 push $0x1314c0
10fc2a: e8 31 2f 00 00 call 112b60 <_Objects_Free>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
10fc2f: e8 74 3c 00 00 call 1138a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
10fc34: e8 3b 9c 00 00 call 119874 <__errno>
10fc39: 89 38 mov %edi,(%eax)
10fc3b: 83 c4 10 add $0x10,%esp
10fc3e: b8 ff ff ff ff mov $0xffffffff,%eax
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10fc43: 8d 65 f4 lea -0xc(%ebp),%esp
10fc46: 5b pop %ebx
10fc47: 5e pop %esi
10fc48: 5f pop %edi
10fc49: c9 leave
10fc4a: c3 ret
10fc4b: 90 nop
_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 * );
10fc4c: 8b 45 14 mov 0x14(%ebp),%eax
10fc4f: 89 45 d0 mov %eax,-0x30(%ebp)
10fc52: e9 33 ff ff ff jmp 10fb8a <mq_open+0x2e>
10fc57: 90 nop
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
_Thread_Enable_dispatch();
10fc58: e8 4b 3c 00 00 call 1138a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
10fc5d: e8 12 9c 00 00 call 119874 <__errno>
10fc62: c7 00 17 00 00 00 movl $0x17,(%eax)
10fc68: b8 ff ff ff ff mov $0xffffffff,%eax
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10fc6d: 8d 65 f4 lea -0xc(%ebp),%esp
10fc70: 5b pop %ebx
10fc71: 5e pop %esi
10fc72: 5f pop %edi
10fc73: c9 leave
10fc74: c3 ret
10fc75: 8d 76 00 lea 0x0(%esi),%esi
10fc78: 83 ec 08 sub $0x8,%esp
10fc7b: 53 push %ebx
10fc7c: 68 c0 14 13 00 push $0x1314c0
10fc81: e8 da 2e 00 00 call 112b60 <_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();
10fc86: e8 1d 3c 00 00 call 1138a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
10fc8b: e8 e4 9b 00 00 call 119874 <__errno>
10fc90: c7 00 11 00 00 00 movl $0x11,(%eax)
10fc96: 83 c4 10 add $0x10,%esp
10fc99: b8 ff ff ff ff mov $0xffffffff,%eax
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
10fc9e: 8d 65 f4 lea -0xc(%ebp),%esp
10fca1: 5b pop %ebx
10fca2: 5e pop %esi
10fca3: 5f pop %edi
10fca4: c9 leave
10fca5: c3 ret
10fca6: 66 90 xchg %ax,%ax
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) ) ) {
10fca8: 8b 55 d4 mov -0x2c(%ebp),%edx
10fcab: 85 d2 test %edx,%edx
10fcad: 0f 84 6e ff ff ff je 10fc21 <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(
10fcb3: 8d 45 e0 lea -0x20(%ebp),%eax
10fcb6: 50 push %eax
10fcb7: ff 75 d0 pushl -0x30(%ebp)
10fcba: 6a 01 push $0x1
10fcbc: ff 75 08 pushl 0x8(%ebp)
10fcbf: e8 34 67 00 00 call 1163f8 <_POSIX_Message_queue_Create_support>
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
10fcc4: 83 c4 10 add $0x10,%esp
10fcc7: 40 inc %eax
10fcc8: 74 26 je 10fcf0 <mq_open+0x194>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
10fcca: 8b 45 e0 mov -0x20(%ebp),%eax
10fccd: 89 43 10 mov %eax,0x10(%ebx)
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
10fcd0: 0f b7 53 08 movzwl 0x8(%ebx),%edx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10fcd4: a1 dc 14 13 00 mov 0x1314dc,%eax
10fcd9: 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;
10fcdc: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
10fce3: e8 c0 3b 00 00 call 1138a8 <_Thread_Enable_dispatch>
return (mqd_t) the_mq_fd->Object.id;
10fce8: 8b 43 08 mov 0x8(%ebx),%eax
10fceb: e9 1f ff ff ff jmp 10fc0f <mq_open+0xb3>
10fcf0: 83 ec 08 sub $0x8,%esp
10fcf3: 53 push %ebx
10fcf4: 68 c0 14 13 00 push $0x1314c0
10fcf9: e8 62 2e 00 00 call 112b60 <_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();
10fcfe: e8 a5 3b 00 00 call 1138a8 <_Thread_Enable_dispatch>
return (mqd_t) -1;
10fd03: 83 c4 10 add $0x10,%esp
10fd06: b8 ff ff ff ff mov $0xffffffff,%eax
10fd0b: e9 ff fe ff ff jmp 10fc0f <mq_open+0xb3>
0011fe84 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
11fe84: 55 push %ebp
11fe85: 89 e5 mov %esp,%ebp
11fe87: 56 push %esi
11fe88: 53 push %ebx
11fe89: 8b 75 08 mov 0x8(%ebp),%esi
11fe8c: 8b 5d 0c mov 0xc(%ebp),%ebx
* Return EINVAL if the delay interval is negative.
*
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
if ( !_Timespec_Is_valid( rqtp ) )
11fe8f: 83 ec 0c sub $0xc,%esp
11fe92: 56 push %esi
11fe93: e8 80 01 00 00 call 120018 <_Timespec_Is_valid>
11fe98: 83 c4 10 add $0x10,%esp
11fe9b: 84 c0 test %al,%al
11fe9d: 0f 84 e1 00 00 00 je 11ff84 <nanosleep+0x100>
rtems_set_errno_and_return_minus_one( EINVAL );
ticks = _Timespec_To_ticks( rqtp );
11fea3: 83 ec 0c sub $0xc,%esp
11fea6: 56 push %esi
11fea7: e8 60 1f ff ff call 111e0c <_Timespec_To_ticks>
11feac: 89 c6 mov %eax,%esi
* A nanosleep for zero time is implemented as a yield.
* This behavior is also beyond the POSIX specification but is
* consistent with the RTEMS API and yields desirable behavior.
*/
if ( !ticks ) {
11feae: 83 c4 10 add $0x10,%esp
11feb1: 85 c0 test %eax,%eax
11feb3: 75 37 jne 11feec <nanosleep+0x68>
11feb5: a1 50 8d 12 00 mov 0x128d50,%eax
11feba: 40 inc %eax
11febb: a3 50 8d 12 00 mov %eax,0x128d50
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
11fec0: ff 15 cc 48 12 00 call *0x1248cc
_Thread_Disable_dispatch();
_Scheduler_Yield();
_Thread_Enable_dispatch();
11fec6: e8 4d df fe ff call 10de18 <_Thread_Enable_dispatch>
if ( rmtp ) {
11fecb: 85 db test %ebx,%ebx
11fecd: 0f 84 93 00 00 00 je 11ff66 <nanosleep+0xe2>
rmtp->tv_sec = 0;
11fed3: c7 03 00 00 00 00 movl $0x0,(%ebx)
rmtp->tv_nsec = 0;
11fed9: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
}
return 0;
11fee0: 31 c0 xor %eax,%eax
rtems_set_errno_and_return_minus_one( EINTR );
#endif
}
return 0;
}
11fee2: 8d 65 f8 lea -0x8(%ebp),%esp
11fee5: 5b pop %ebx
11fee6: 5e pop %esi
11fee7: c9 leave
11fee8: c3 ret
11fee9: 8d 76 00 lea 0x0(%esi),%esi
11feec: a1 50 8d 12 00 mov 0x128d50,%eax
11fef1: 40 inc %eax
11fef2: a3 50 8d 12 00 mov %eax,0x128d50
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
11fef7: 83 ec 08 sub $0x8,%esp
11fefa: 68 08 00 00 10 push $0x10000008
11feff: ff 35 f8 92 12 00 pushl 0x1292f8
11ff05: e8 32 e7 fe ff call 10e63c <_Thread_Set_state>
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
11ff0a: 8b 15 f8 92 12 00 mov 0x1292f8,%edx
_Thread_Disable_dispatch();
_Thread_Set_state(
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
11ff10: 8b 42 08 mov 0x8(%edx),%eax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
11ff13: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
the_watchdog->routine = routine;
11ff1a: c7 42 64 64 dc 10 00 movl $0x10dc64,0x64(%edx)
the_watchdog->id = id;
11ff21: 89 42 68 mov %eax,0x68(%edx)
the_watchdog->user_data = user_data;
11ff24: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
11ff2b: 89 72 54 mov %esi,0x54(%edx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
11ff2e: 58 pop %eax
11ff2f: 59 pop %ecx
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
11ff30: 83 c2 48 add $0x48,%edx
11ff33: 52 push %edx
11ff34: 68 20 8e 12 00 push $0x128e20
11ff39: e8 c6 ec fe ff call 10ec04 <_Watchdog_Insert>
_Thread_Enable_dispatch();
11ff3e: e8 d5 de fe ff call 10de18 <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
11ff43: 83 c4 10 add $0x10,%esp
11ff46: 85 db test %ebx,%ebx
11ff48: 74 1c je 11ff66 <nanosleep+0xe2>
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
11ff4a: a1 f8 92 12 00 mov 0x1292f8,%eax
11ff4f: 03 70 5c add 0x5c(%eax),%esi
_Thread_Enable_dispatch();
/* calculate time remaining */
if ( rmtp ) {
ticks -=
11ff52: 2b 70 60 sub 0x60(%eax),%esi
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
11ff55: 83 ec 08 sub $0x8,%esp
11ff58: 53 push %ebx
11ff59: 56 push %esi
11ff5a: e8 71 00 00 00 call 11ffd0 <_Timespec_From_ticks>
*/
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
11ff5f: 83 c4 10 add $0x10,%esp
11ff62: 85 f6 test %esi,%esi
11ff64: 75 09 jne 11ff6f <nanosleep+0xeb>
rtems_set_errno_and_return_minus_one( EINTR );
#endif
}
return 0;
11ff66: 31 c0 xor %eax,%eax
}
11ff68: 8d 65 f8 lea -0x8(%ebp),%esp
11ff6b: 5b pop %ebx
11ff6c: 5e pop %esi
11ff6d: c9 leave
11ff6e: c3 ret
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
11ff6f: e8 10 38 ff ff call 113784 <__errno>
11ff74: c7 00 04 00 00 00 movl $0x4,(%eax)
11ff7a: b8 ff ff ff ff mov $0xffffffff,%eax
11ff7f: e9 5e ff ff ff jmp 11fee2 <nanosleep+0x5e>
*
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
if ( !_Timespec_Is_valid( rqtp ) )
rtems_set_errno_and_return_minus_one( EINVAL );
11ff84: e8 fb 37 ff ff call 113784 <__errno>
11ff89: c7 00 16 00 00 00 movl $0x16,(%eax)
11ff8f: b8 ff ff ff ff mov $0xffffffff,%eax
11ff94: e9 49 ff ff ff jmp 11fee2 <nanosleep+0x5e>
001088f0 <newlib_create_hook>:
*/
bool newlib_create_hook(
rtems_tcb *current_task __attribute__((unused)),
rtems_tcb *creating_task
)
{
1088f0: 55 push %ebp
1088f1: 89 e5 mov %esp,%ebp
1088f3: 57 push %edi
1088f4: 56 push %esi
1088f5: 53 push %ebx
1088f6: 83 ec 0c sub $0xc,%esp
struct _reent *ptr;
if (_Thread_libc_reent == 0)
1088f9: a1 e4 7e 12 00 mov 0x127ee4,%eax
1088fe: 85 c0 test %eax,%eax
108900: 0f 84 52 02 00 00 je 108b58 <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));
108906: 83 ec 0c sub $0xc,%esp
108909: 68 24 04 00 00 push $0x424
10890e: e8 d1 60 00 00 call 10e9e4 <_Workspace_Allocate>
108913: 89 c2 mov %eax,%edx
#endif
if (ptr) {
108915: 83 c4 10 add $0x10,%esp
108918: 85 c0 test %eax,%eax
10891a: 0f 84 2c 02 00 00 je 108b4c <newlib_create_hook+0x25c><== NEVER TAKEN
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
108920: c7 00 00 00 00 00 movl $0x0,(%eax)
108926: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx
10892c: 89 58 04 mov %ebx,0x4(%eax)
10892f: 8d 80 54 03 00 00 lea 0x354(%eax),%eax
108935: 89 42 08 mov %eax,0x8(%edx)
108938: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax
10893e: 89 42 0c mov %eax,0xc(%edx)
108941: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx)
108948: 8d 72 14 lea 0x14(%edx),%esi
10894b: 31 c0 xor %eax,%eax
10894d: b9 19 00 00 00 mov $0x19,%ecx
108952: 89 f7 mov %esi,%edi
108954: f3 aa rep stos %al,%es:(%edi)
108956: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
10895d: c7 42 34 4a 11 12 00 movl $0x12114a,0x34(%edx)
108964: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx)
10896b: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx)
108972: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx)
108979: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx)
108980: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx)
108987: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx)
10898e: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
108995: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx)
10899c: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx)
1089a3: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx)
1089aa: c6 42 60 00 movb $0x0,0x60(%edx)
1089ae: 8d 72 7c lea 0x7c(%edx),%esi
1089b1: b1 24 mov $0x24,%cl
1089b3: 89 f7 mov %esi,%edi
1089b5: f3 aa rep stos %al,%es:(%edi)
1089b7: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx)
1089be: 00 00 00
1089c1: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx)
1089c8: 00 00 00
1089cb: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx)
1089d2: 00 00 00
1089d5: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx)
1089dc: 0e 33
1089de: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx)
1089e5: cd ab
1089e7: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx)
1089ee: 34 12
1089f0: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx)
1089f7: 6d e6
1089f9: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx)
108a00: ec de
108a02: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx)
108a09: 05 00
108a0b: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx)
108a12: 0b 00
108a14: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx)
108a1b: 00 00 00
108a1e: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx)
108a25: 00 00 00
108a28: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx)
108a2f: 00 00 00
108a32: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx)
108a39: 00 00 00
108a3c: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx)
108a43: 00 00 00
108a46: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx)
108a4d: 00 00 00
108a50: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx)
108a57: 00 00 00
108a5a: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx)
108a61: 00 00 00
108a64: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx)
108a6b: 00 00 00
108a6e: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx)
108a75: 00 00 00
108a78: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx)
108a7f: 00 00 00
108a82: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx)
108a89: 00 00 00
108a8c: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx)
108a93: 00 00 00
108a96: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx)
108a9d: 00 00 00
108aa0: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx)
108aa7: 00 00 00
108aaa: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx)
108ab1: 00 00 00
108ab4: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx)
108abb: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx)
108ac2: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx)
108ac9: 00 00 00
108acc: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx)
108ad3: 00 00 00
108ad6: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx)
108add: 00 00 00
108ae0: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx)
108ae7: 00 00 00
108aea: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx)
108af1: 00 00 00
108af4: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx)
108afb: 00 00 00
108afe: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx)
108b05: 00 00 00
108b08: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx)
108b0f: 00 00 00
108b12: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx)
108b19: 00 00 00
108b1c: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx)
108b23: 00 00 00
108b26: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx)
108b2d: 00 00 00
108b30: 66 b9 38 01 mov $0x138,%cx
108b34: 89 df mov %ebx,%edi
108b36: f3 aa rep stos %al,%es:(%edi)
creating_task->libc_reent = ptr;
108b38: 8b 45 0c mov 0xc(%ebp),%eax
108b3b: 89 90 e4 00 00 00 mov %edx,0xe4(%eax)
return TRUE;
108b41: b0 01 mov $0x1,%al
}
return FALSE;
}
108b43: 8d 65 f4 lea -0xc(%ebp),%esp
108b46: 5b pop %ebx
108b47: 5e pop %esi
108b48: 5f pop %edi
108b49: c9 leave
108b4a: c3 ret
108b4b: 90 nop
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
creating_task->libc_reent = ptr;
return TRUE;
}
return FALSE;
108b4c: 31 c0 xor %eax,%eax
}
108b4e: 8d 65 f4 lea -0xc(%ebp),%esp
108b51: 5b pop %ebx
108b52: 5e pop %esi
108b53: 5f pop %edi
108b54: c9 leave
108b55: c3 ret
108b56: 66 90 xchg %ax,%ax
{
struct _reent *ptr;
if (_Thread_libc_reent == 0)
{
_REENT = _global_impure_ptr;
108b58: a1 a0 1f 12 00 mov 0x121fa0,%eax
108b5d: a3 60 5b 12 00 mov %eax,0x125b60
RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent (
struct _reent **libc_reent
)
{
_Thread_libc_reent = libc_reent;
108b62: c7 05 e4 7e 12 00 60 movl $0x125b60,0x127ee4
108b69: 5b 12 00
108b6c: e9 95 fd ff ff jmp 108906 <newlib_create_hook+0x16>
00108b74 <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
108b74: 55 push %ebp
108b75: 89 e5 mov %esp,%ebp
108b77: 57 push %edi
108b78: 56 push %esi
108b79: 53 push %ebx
108b7a: 83 ec 0c sub $0xc,%esp
108b7d: 8b 7d 08 mov 0x8(%ebp),%edi
108b80: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
108b83: 39 df cmp %ebx,%edi
108b85: 74 55 je 108bdc <newlib_delete_hook+0x68>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
108b87: 8b b3 e4 00 00 00 mov 0xe4(%ebx),%esi
}
if (ptr && ptr != _global_impure_ptr) {
108b8d: 85 f6 test %esi,%esi
108b8f: 74 21 je 108bb2 <newlib_delete_hook+0x3e><== NEVER TAKEN
108b91: 3b 35 a0 1f 12 00 cmp 0x121fa0,%esi
108b97: 74 19 je 108bb2 <newlib_delete_hook+0x3e>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
108b99: 83 ec 08 sub $0x8,%esp
108b9c: 68 94 88 10 00 push $0x108894
108ba1: 56 push %esi
108ba2: e8 25 af 00 00 call 113acc <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
108ba7: 89 34 24 mov %esi,(%esp)
108baa: e8 51 5e 00 00 call 10ea00 <_Workspace_Free>
108baf: 83 c4 10 add $0x10,%esp
#endif
}
deleted_task->libc_reent = NULL;
108bb2: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
108bb9: 00 00 00
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
108bbc: 39 df cmp %ebx,%edi
108bbe: 74 08 je 108bc8 <newlib_delete_hook+0x54>
_REENT = 0;
}
}
108bc0: 8d 65 f4 lea -0xc(%ebp),%esp
108bc3: 5b pop %ebx
108bc4: 5e pop %esi
108bc5: 5f pop %edi
108bc6: c9 leave
108bc7: c3 ret
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
108bc8: c7 05 60 5b 12 00 00 movl $0x0,0x125b60
108bcf: 00 00 00
}
}
108bd2: 8d 65 f4 lea -0xc(%ebp),%esp
108bd5: 5b pop %ebx
108bd6: 5e pop %esi
108bd7: 5f pop %edi
108bd8: c9 leave
108bd9: c3 ret
108bda: 66 90 xchg %ax,%ax
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
108bdc: 8b 35 60 5b 12 00 mov 0x125b60,%esi
108be2: eb a9 jmp 108b8d <newlib_delete_hook+0x19>
00108894 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
108894: 55 push %ebp
108895: 89 e5 mov %esp,%ebp
108897: 53 push %ebx
108898: 83 ec 10 sub $0x10,%esp
10889b: 8b 5d 08 mov 0x8(%ebp),%ebx
switch ( fileno(fp) ) {
10889e: 53 push %ebx
10889f: e8 14 ae 00 00 call 1136b8 <fileno>
1088a4: 83 c4 10 add $0x10,%esp
1088a7: 83 f8 02 cmp $0x2,%eax
1088aa: 76 14 jbe 1088c0 <newlib_free_buffers+0x2c><== ALWAYS TAKEN
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
1088ac: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1088af: 53 push %ebx <== NOT EXECUTED
1088b0: e8 87 ab 00 00 call 11343c <fclose> <== NOT EXECUTED
1088b5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
}
1088b8: 31 c0 xor %eax,%eax
1088ba: 8b 5d fc mov -0x4(%ebp),%ebx
1088bd: c9 leave
1088be: c3 ret
1088bf: 90 nop
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
1088c0: f6 43 0c 80 testb $0x80,0xc(%ebx)
1088c4: 74 f2 je 1088b8 <newlib_free_buffers+0x24><== ALWAYS TAKEN
free( fp->_bf._base );
1088c6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1088c9: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
1088cc: e8 03 f8 ff ff call 1080d4 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
1088d1: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
1088d7: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED
1088dd: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED
1088e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
1088e7: 31 c0 xor %eax,%eax <== NOT EXECUTED
1088e9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
1088ec: c9 leave <== NOT EXECUTED
1088ed: c3 ret <== NOT EXECUTED
00107cf4 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
107cf4: 55 push %ebp
107cf5: 89 e5 mov %esp,%ebp
107cf7: 53 push %ebx
107cf8: 83 ec 04 sub $0x4,%esp
107cfb: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_device_driver status;
if ( !initialized ) {
107cfe: 80 3d e0 59 12 00 00 cmpb $0x0,0x1259e0
107d05: 74 09 je 107d10 <null_initialize+0x1c>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
107d07: 31 c0 xor %eax,%eax
107d09: 8b 5d fc mov -0x4(%ebp),%ebx
107d0c: c9 leave
107d0d: c3 ret
107d0e: 66 90 xchg %ax,%ax
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
107d10: c6 05 e0 59 12 00 01 movb $0x1,0x1259e0
status = rtems_io_register_name(
107d17: 50 push %eax
107d18: 6a 00 push $0x0
107d1a: 53 push %ebx
107d1b: 68 1a da 11 00 push $0x11da1a
107d20: e8 7b 01 00 00 call 107ea0 <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
107d25: 83 c4 10 add $0x10,%esp
107d28: 85 c0 test %eax,%eax
107d2a: 75 0d jne 107d39 <null_initialize+0x45>
rtems_fatal_error_occurred(status);
NULL_major = major;
107d2c: 89 1d 20 5d 12 00 mov %ebx,0x125d20
}
return RTEMS_SUCCESSFUL;
}
107d32: 31 c0 xor %eax,%eax
107d34: 8b 5d fc mov -0x4(%ebp),%ebx
107d37: c9 leave
107d38: c3 ret
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
107d39: 83 ec 0c sub $0xc,%esp
107d3c: 50 push %eax
107d3d: e8 d6 41 00 00 call 10bf18 <rtems_fatal_error_occurred>
00108c44 <open>:
int open(
const char *pathname,
int flags,
...
)
{
108c44: 55 push %ebp
108c45: 89 e5 mov %esp,%ebp
108c47: 57 push %edi
108c48: 56 push %esi
108c49: 53 push %ebx
108c4a: 83 ec 4c sub $0x4c,%esp
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
108c4d: 8b 45 0c mov 0xc(%ebp),%eax
108c50: 40 inc %eax
if ( ( status & _FREAD ) == _FREAD )
108c51: 89 c3 mov %eax,%ebx
108c53: 83 e3 01 and $0x1,%ebx
eval_flags |= RTEMS_LIBIO_PERMS_READ;
108c56: f7 db neg %ebx
108c58: 83 e3 04 and $0x4,%ebx
if ( ( status & _FWRITE ) == _FWRITE )
108c5b: a8 02 test $0x2,%al
108c5d: 74 03 je 108c62 <open+0x1e>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
108c5f: 83 cb 02 or $0x2,%ebx
va_start(ap, flags);
mode = va_arg( ap, int );
108c62: 8b 45 10 mov 0x10(%ebp),%eax
108c65: 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();
108c68: e8 fb 71 00 00 call 10fe68 <rtems_libio_allocate>
108c6d: 89 c2 mov %eax,%edx
if ( iop == 0 ) {
108c6f: 85 c0 test %eax,%eax
108c71: 0f 84 c5 00 00 00 je 108d3c <open+0xf8>
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
108c77: 31 f6 xor %esi,%esi
108c79: b9 ff ff ff ff mov $0xffffffff,%ecx
108c7e: 8b 7d 08 mov 0x8(%ebp),%edi
108c81: 89 f0 mov %esi,%eax
108c83: f2 ae repnz scas %es:(%edi),%al
108c85: f7 d1 not %ecx
108c87: 49 dec %ecx
108c88: 83 ec 0c sub $0xc,%esp
108c8b: 6a 01 push $0x1
108c8d: 8d 45 d4 lea -0x2c(%ebp),%eax
108c90: 89 45 b4 mov %eax,-0x4c(%ebp)
108c93: 50 push %eax
108c94: 53 push %ebx
108c95: 51 push %ecx
108c96: ff 75 08 pushl 0x8(%ebp)
108c99: 89 55 c0 mov %edx,-0x40(%ebp)
108c9c: e8 47 f3 ff ff call 107fe8 <rtems_filesystem_evaluate_path>
108ca1: 89 c3 mov %eax,%ebx
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
108ca3: 83 c4 20 add $0x20,%esp
108ca6: 83 f8 ff cmp $0xffffffff,%eax
108ca9: 8b 55 c0 mov -0x40(%ebp),%edx
108cac: 0f 84 de 00 00 00 je 108d90 <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)) {
108cb2: 8b 45 0c mov 0xc(%ebp),%eax
108cb5: 25 00 0a 00 00 and $0xa00,%eax
108cba: 3d 00 0a 00 00 cmp $0xa00,%eax
108cbf: 0f 84 8b 00 00 00 je 108d50 <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 );
108cc5: 8b 5a 14 mov 0x14(%edx),%ebx
108cc8: 83 ec 0c sub $0xc,%esp
108ccb: ff 75 0c pushl 0xc(%ebp)
108cce: 89 55 c0 mov %edx,-0x40(%ebp)
108cd1: e8 16 71 00 00 call 10fdec <rtems_libio_fcntl_flags>
108cd6: 09 d8 or %ebx,%eax
108cd8: 8b 55 c0 mov -0x40(%ebp),%edx
108cdb: 89 42 14 mov %eax,0x14(%edx)
iop->pathinfo = loc;
108cde: 8d 7a 18 lea 0x18(%edx),%edi
108ce1: b9 05 00 00 00 mov $0x5,%ecx
108ce6: 8b 75 b4 mov -0x4c(%ebp),%esi
108ce9: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
108ceb: 8b 42 20 mov 0x20(%edx),%eax
108cee: ff 75 c4 pushl -0x3c(%ebp)
108cf1: ff 75 0c pushl 0xc(%ebp)
108cf4: ff 75 08 pushl 0x8(%ebp)
108cf7: 52 push %edx
108cf8: ff 10 call *(%eax)
if ( rc ) {
108cfa: 83 c4 20 add $0x20,%esp
108cfd: 85 c0 test %eax,%eax
108cff: 8b 55 c0 mov -0x40(%ebp),%edx
108d02: 75 78 jne 108d7c <open+0x138>
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
108d04: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
108d0b: 0f 85 9f 00 00 00 jne 108db0 <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;
108d11: 2b 15 e0 7c 12 00 sub 0x127ce0,%edx
108d17: c1 fa 03 sar $0x3,%edx
108d1a: 8d 04 d2 lea (%edx,%edx,8),%eax
108d1d: 8d 04 c2 lea (%edx,%eax,8),%eax
108d20: 8d 04 c2 lea (%edx,%eax,8),%eax
108d23: 8d 04 c2 lea (%edx,%eax,8),%eax
108d26: 89 c1 mov %eax,%ecx
108d28: c1 e1 0f shl $0xf,%ecx
108d2b: 01 c8 add %ecx,%eax
108d2d: 8d 04 c2 lea (%edx,%eax,8),%eax
108d30: f7 d8 neg %eax
}
108d32: 8d 65 f4 lea -0xc(%ebp),%esp
108d35: 5b pop %ebx
108d36: 5e pop %esi
108d37: 5f pop %edi
108d38: c9 leave
108d39: c3 ret
108d3a: 66 90 xchg %ax,%ax
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
rc = ENFILE;
108d3c: 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 );
108d41: e8 9e a5 00 00 call 1132e4 <__errno>
108d46: 89 18 mov %ebx,(%eax)
108d48: b8 ff ff ff ff mov $0xffffffff,%eax
108d4d: eb e3 jmp 108d32 <open+0xee>
108d4f: 90 nop
}
} 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;
108d50: 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;
108d53: bb 11 00 00 00 mov $0x11,%ebx
*/
done:
va_end(ap);
if ( rc ) {
if ( iop )
108d58: 85 d2 test %edx,%edx
108d5a: 74 0c je 108d68 <open+0x124>
rtems_libio_free( iop );
108d5c: 83 ec 0c sub $0xc,%esp
108d5f: 52 push %edx
108d60: e8 a7 71 00 00 call 10ff0c <rtems_libio_free>
108d65: 83 c4 10 add $0x10,%esp
if ( loc_to_free )
108d68: 85 f6 test %esi,%esi
108d6a: 74 d5 je 108d41 <open+0xfd>
rtems_filesystem_freenode( loc_to_free );
108d6c: 83 ec 0c sub $0xc,%esp
108d6f: 56 push %esi
108d70: e8 4b f3 ff ff call 1080c0 <rtems_filesystem_freenode>
108d75: 83 c4 10 add $0x10,%esp
108d78: eb c7 jmp 108d41 <open+0xfd>
108d7a: 66 90 xchg %ax,%ax
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
108d7c: e8 63 a5 00 00 call 1132e4 <__errno>
108d81: 8b 18 mov (%eax),%ebx
rc = EEXIST;
loc_to_free = &loc;
goto done;
}
loc_to_free = &loc;
108d83: 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;
108d86: 8b 55 c0 mov -0x40(%ebp),%edx
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
108d89: 85 db test %ebx,%ebx
108d8b: 74 84 je 108d11 <open+0xcd> <== NEVER TAKEN
108d8d: eb c9 jmp 108d58 <open+0x114>
108d8f: 90 nop
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
108d90: e8 4f a5 00 00 call 1132e4 <__errno>
108d95: 83 38 02 cmpl $0x2,(%eax)
108d98: 8b 55 c0 mov -0x40(%ebp),%edx
108d9b: 0f 84 9b 00 00 00 je 108e3c <open+0x1f8>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
108da1: e8 3e a5 00 00 call 1132e4 <__errno>
108da6: 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;
108da8: 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;
108daa: 8b 55 c0 mov -0x40(%ebp),%edx
108dad: eb da jmp 108d89 <open+0x145>
108daf: 90 nop
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
108db0: 51 push %ecx
108db1: 6a 00 push $0x0
108db3: 6a 00 push $0x0
108db5: 89 d0 mov %edx,%eax
108db7: 2b 05 e0 7c 12 00 sub 0x127ce0,%eax
108dbd: c1 f8 03 sar $0x3,%eax
108dc0: 8d 0c c0 lea (%eax,%eax,8),%ecx
108dc3: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108dc6: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108dc9: 8d 0c c8 lea (%eax,%ecx,8),%ecx
108dcc: 89 cb mov %ecx,%ebx
108dce: c1 e3 0f shl $0xf,%ebx
108dd1: 01 d9 add %ebx,%ecx
108dd3: 8d 04 c8 lea (%eax,%ecx,8),%eax
108dd6: f7 d8 neg %eax
108dd8: 50 push %eax
108dd9: 89 55 c0 mov %edx,-0x40(%ebp)
108ddc: e8 3b 6f 00 00 call 10fd1c <ftruncate>
108de1: 89 c3 mov %eax,%ebx
if ( rc ) {
108de3: 83 c4 10 add $0x10,%esp
108de6: 85 c0 test %eax,%eax
108de8: 8b 55 c0 mov -0x40(%ebp),%edx
108deb: 0f 84 20 ff ff ff je 108d11 <open+0xcd>
if(errno) rc = errno;
108df1: e8 ee a4 00 00 call 1132e4 <__errno>
108df6: 8b 00 mov (%eax),%eax
108df8: 85 c0 test %eax,%eax
108dfa: 8b 55 c0 mov -0x40(%ebp),%edx
108dfd: 0f 85 b2 00 00 00 jne 108eb5 <open+0x271> <== ALWAYS TAKEN
close( iop - rtems_libio_iops );
108e03: 83 ec 0c sub $0xc,%esp
108e06: 2b 15 e0 7c 12 00 sub 0x127ce0,%edx
108e0c: c1 fa 03 sar $0x3,%edx
108e0f: 8d 04 d2 lea (%edx,%edx,8),%eax
108e12: 8d 04 c2 lea (%edx,%eax,8),%eax
108e15: 8d 04 c2 lea (%edx,%eax,8),%eax
108e18: 8d 04 c2 lea (%edx,%eax,8),%eax
108e1b: 89 c1 mov %eax,%ecx
108e1d: c1 e1 0f shl $0xf,%ecx
108e20: 01 c8 add %ecx,%eax
108e22: 8d 04 c2 lea (%edx,%eax,8),%eax
108e25: f7 d8 neg %eax
108e27: 50 push %eax
108e28: e8 6f 6e 00 00 call 10fc9c <close>
108e2d: 83 c4 10 add $0x10,%esp
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
108e30: 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;
108e32: 31 d2 xor %edx,%edx
108e34: e9 50 ff ff ff jmp 108d89 <open+0x145>
108e39: 8d 76 00 lea 0x0(%esi),%esi
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
108e3c: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
108e43: 75 0f jne 108e54 <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;
108e45: 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;
108e47: bb 02 00 00 00 mov $0x2,%ebx
108e4c: e9 07 ff ff ff jmp 108d58 <open+0x114>
108e51: 8d 76 00 lea 0x0(%esi),%esi
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
108e54: 6a 00 push $0x0
108e56: 6a 00 push $0x0
108e58: 8b 45 c4 mov -0x3c(%ebp),%eax
108e5b: 80 cc 80 or $0x80,%ah
108e5e: 50 push %eax
108e5f: ff 75 08 pushl 0x8(%ebp)
108e62: 89 55 c0 mov %edx,-0x40(%ebp)
108e65: e8 02 f6 ff ff call 10846c <mknod>
if ( rc ) {
108e6a: 83 c4 10 add $0x10,%esp
108e6d: 85 c0 test %eax,%eax
108e6f: 8b 55 c0 mov -0x40(%ebp),%edx
108e72: 0f 85 29 ff ff ff jne 108da1 <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(
108e78: 89 d9 mov %ebx,%ecx
108e7a: 8b 7d 08 mov 0x8(%ebp),%edi
108e7d: 89 f0 mov %esi,%eax
108e7f: f2 ae repnz scas %es:(%edi),%al
108e81: f7 d1 not %ecx
108e83: 49 dec %ecx
108e84: 83 ec 0c sub $0xc,%esp
108e87: 6a 01 push $0x1
108e89: 8d 45 d4 lea -0x2c(%ebp),%eax
108e8c: 50 push %eax
108e8d: 6a 00 push $0x0
108e8f: 51 push %ecx
108e90: ff 75 08 pushl 0x8(%ebp)
108e93: 89 55 c0 mov %edx,-0x40(%ebp)
108e96: e8 4d f1 ff ff call 107fe8 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
108e9b: 83 c4 20 add $0x20,%esp
108e9e: 85 c0 test %eax,%eax
108ea0: 8b 55 c0 mov -0x40(%ebp),%edx
108ea3: 0f 84 1c fe ff ff je 108cc5 <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;
108ea9: 31 f6 xor %esi,%esi
* 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;
108eab: bb 0d 00 00 00 mov $0xd,%ebx <== NOT EXECUTED
108eb0: e9 a3 fe ff ff jmp 108d58 <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;
108eb5: e8 2a a4 00 00 call 1132e4 <__errno>
108eba: 8b 18 mov (%eax),%ebx
108ebc: 8b 55 c0 mov -0x40(%ebp),%edx
108ebf: e9 3f ff ff ff jmp 108e03 <open+0x1bf>
00109c48 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
109c48: 55 push %ebp
109c49: 89 e5 mov %esp,%ebp
109c4b: 56 push %esi
109c4c: 53 push %ebx
109c4d: 83 ec 10 sub $0x10,%esp
109c50: 88 45 f4 mov %al,-0xc(%ebp)
int i;
if (tty->termios.c_oflag & OPOST) {
109c53: 8b 4a 34 mov 0x34(%edx),%ecx
109c56: f6 c1 01 test $0x1,%cl
109c59: 74 31 je 109c8c <oproc+0x44> <== NEVER TAKEN
switch (c) {
109c5b: 3c 09 cmp $0x9,%al
109c5d: 0f 84 b1 00 00 00 je 109d14 <oproc+0xcc>
109c63: 76 3f jbe 109ca4 <oproc+0x5c> <== NEVER TAKEN
109c65: 3c 0a cmp $0xa,%al
109c67: 74 4f je 109cb8 <oproc+0x70>
109c69: 3c 0d cmp $0xd,%al
109c6b: 74 7f je 109cec <oproc+0xa4> <== NEVER TAKEN
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
109c6d: 83 e1 02 and $0x2,%ecx
109c70: 0f 85 c6 00 00 00 jne 109d3c <oproc+0xf4> <== NEVER TAKEN
109c76: 8b 0d 54 5b 12 00 mov 0x125b54,%ecx
c = toupper(c);
if (!iscntrl(c))
109c7c: 0f b6 c0 movzbl %al,%eax
109c7f: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1)
109c84: 75 06 jne 109c8c <oproc+0x44> <== NEVER TAKEN
tty->column++;
109c86: ff 42 28 incl 0x28(%edx)
109c89: 8d 76 00 lea 0x0(%esi),%esi
break;
}
}
rtems_termios_puts (&c, 1, tty);
109c8c: 53 push %ebx
109c8d: 52 push %edx
109c8e: 6a 01 push $0x1
109c90: 8d 45 f4 lea -0xc(%ebp),%eax
109c93: 50 push %eax
109c94: e8 7b fe ff ff call 109b14 <rtems_termios_puts>
109c99: 83 c4 10 add $0x10,%esp
}
109c9c: 8d 65 f8 lea -0x8(%ebp),%esp
109c9f: 5b pop %ebx
109ca0: 5e pop %esi
109ca1: c9 leave
109ca2: c3 ret
109ca3: 90 nop
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
109ca4: 3c 08 cmp $0x8,%al <== NOT EXECUTED
109ca6: 75 c5 jne 109c6d <oproc+0x25> <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
109ca8: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED
109cab: 85 c0 test %eax,%eax <== NOT EXECUTED
109cad: 7e dd jle 109c8c <oproc+0x44> <== NOT EXECUTED
tty->column--;
109caf: 48 dec %eax <== NOT EXECUTED
109cb0: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED
109cb3: eb d7 jmp 109c8c <oproc+0x44> <== NOT EXECUTED
109cb5: 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)
109cb8: f6 c1 20 test $0x20,%cl
109cbb: 74 07 je 109cc4 <oproc+0x7c> <== ALWAYS TAKEN
tty->column = 0;
109cbd: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
109cc4: 83 e1 04 and $0x4,%ecx
109cc7: 74 c3 je 109c8c <oproc+0x44> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
109cc9: 51 push %ecx
109cca: 52 push %edx
109ccb: 6a 01 push $0x1
109ccd: 68 c4 14 12 00 push $0x1214c4
109cd2: 89 55 f0 mov %edx,-0x10(%ebp)
109cd5: e8 3a fe ff ff call 109b14 <rtems_termios_puts>
tty->column = 0;
109cda: 8b 55 f0 mov -0x10(%ebp),%edx
109cdd: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx)
109ce4: 83 c4 10 add $0x10,%esp
109ce7: eb a3 jmp 109c8c <oproc+0x44>
109ce9: 8d 76 00 lea 0x0(%esi),%esi
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
109cec: f6 c1 10 test $0x10,%cl <== NOT EXECUTED
109cef: 74 07 je 109cf8 <oproc+0xb0> <== NOT EXECUTED
109cf1: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED
109cf4: 85 c0 test %eax,%eax <== NOT EXECUTED
109cf6: 74 a4 je 109c9c <oproc+0x54> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
109cf8: f6 c1 08 test $0x8,%cl <== NOT EXECUTED
109cfb: 74 09 je 109d06 <oproc+0xbe> <== NOT EXECUTED
c = '\n';
109cfd: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
109d01: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED
109d04: 74 86 je 109c8c <oproc+0x44> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
109d06: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED
break;
109d0d: e9 7a ff ff ff jmp 109c8c <oproc+0x44> <== NOT EXECUTED
109d12: 66 90 xchg %ax,%ax <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
109d14: 8b 5a 28 mov 0x28(%edx),%ebx
109d17: 89 de mov %ebx,%esi
109d19: 83 e6 07 and $0x7,%esi
109d1c: b8 08 00 00 00 mov $0x8,%eax
109d21: 29 f0 sub %esi,%eax
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
109d23: 81 e1 00 18 00 00 and $0x1800,%ecx
109d29: 81 f9 00 18 00 00 cmp $0x1800,%ecx
109d2f: 74 37 je 109d68 <oproc+0x120> <== ALWAYS TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
109d31: 01 d8 add %ebx,%eax <== NOT EXECUTED
109d33: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED
break;
109d36: e9 51 ff ff ff jmp 109c8c <oproc+0x44> <== NOT EXECUTED
109d3b: 90 nop <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
109d3c: 8b 0d 54 5b 12 00 mov 0x125b54,%ecx <== NOT EXECUTED
109d42: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
109d45: 0f be 5c 01 01 movsbl 0x1(%ecx,%eax,1),%ebx <== NOT EXECUTED
109d4a: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED
109d4d: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED
109d50: 74 0e je 109d60 <oproc+0x118> <== NOT EXECUTED
109d52: 89 c3 mov %eax,%ebx <== NOT EXECUTED
109d54: 88 d8 mov %bl,%al <== NOT EXECUTED
109d56: 88 5d f4 mov %bl,-0xc(%ebp) <== NOT EXECUTED
109d59: e9 1e ff ff ff jmp 109c7c <oproc+0x34> <== NOT EXECUTED
109d5e: 66 90 xchg %ax,%ax <== NOT EXECUTED
109d60: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED
109d63: eb ef jmp 109d54 <oproc+0x10c> <== NOT EXECUTED
109d65: 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;
109d68: 8d 1c 18 lea (%eax,%ebx,1),%ebx
109d6b: 89 5a 28 mov %ebx,0x28(%edx)
rtems_termios_puts ( " ", i, tty);
109d6e: 56 push %esi
109d6f: 52 push %edx
109d70: 50 push %eax
109d71: 68 5c 10 12 00 push $0x12105c
109d76: e8 99 fd ff ff call 109b14 <rtems_termios_puts>
return;
109d7b: 83 c4 10 add $0x10,%esp
109d7e: e9 19 ff ff ff jmp 109c9c <oproc+0x54>
0010a080 <pathconf>:
long pathconf(
const char *path,
int name
)
{
10a080: 55 push %ebp
10a081: 89 e5 mov %esp,%ebp
10a083: 56 push %esi
10a084: 53 push %ebx
int status;
int fd;
fd = open( path, O_RDONLY );
10a085: 83 ec 08 sub $0x8,%esp
10a088: 6a 00 push $0x0
10a08a: ff 75 08 pushl 0x8(%ebp)
10a08d: e8 4e fd ff ff call 109de0 <open>
10a092: 89 c3 mov %eax,%ebx
if ( fd == -1 )
10a094: 83 c4 10 add $0x10,%esp
10a097: 83 f8 ff cmp $0xffffffff,%eax
10a09a: 74 24 je 10a0c0 <pathconf+0x40>
return -1;
status = fpathconf( fd, name );
10a09c: 83 ec 08 sub $0x8,%esp
10a09f: ff 75 0c pushl 0xc(%ebp)
10a0a2: 50 push %eax
10a0a3: e8 98 ec ff ff call 108d40 <fpathconf>
10a0a8: 89 c6 mov %eax,%esi
(void) close( fd );
10a0aa: 89 1c 24 mov %ebx,(%esp)
10a0ad: e8 2e e8 ff ff call 1088e0 <close>
return status;
10a0b2: 83 c4 10 add $0x10,%esp
10a0b5: 89 f0 mov %esi,%eax
}
10a0b7: 8d 65 f8 lea -0x8(%ebp),%esp
10a0ba: 5b pop %ebx
10a0bb: 5e pop %esi
10a0bc: c9 leave
10a0bd: c3 ret
10a0be: 66 90 xchg %ax,%ax
int status;
int fd;
fd = open( path, O_RDONLY );
if ( fd == -1 )
return -1;
10a0c0: b8 ff ff ff ff mov $0xffffffff,%eax
status = fpathconf( fd, name );
(void) close( fd );
return status;
}
10a0c5: 8d 65 f8 lea -0x8(%ebp),%esp
10a0c8: 5b pop %ebx
10a0c9: 5e pop %esi
10a0ca: c9 leave
10a0cb: c3 ret
00110ddc <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
110ddc: 55 push %ebp
110ddd: 89 e5 mov %esp,%ebp
110ddf: 57 push %edi
110de0: 56 push %esi
110de1: 53 push %ebx
110de2: 83 ec 24 sub $0x24,%esp
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
110de5: 68 ff 01 00 00 push $0x1ff
110dea: 68 2c 36 12 00 push $0x12362c
110def: e8 38 17 00 00 call 11252c <rtems_mkdir>
110df4: 83 c4 10 add $0x10,%esp
110df7: 85 c0 test %eax,%eax
110df9: 74 0d je 110e08 <pipe_create+0x2c> <== ALWAYS TAKEN
return -1;
110dfb: 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;
}
110e00: 8d 65 f4 lea -0xc(%ebp),%esp
110e03: 5b pop %ebx
110e04: 5e pop %esi
110e05: 5f pop %edi
110e06: c9 leave
110e07: 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);
110e08: 8d 5d d9 lea -0x27(%ebp),%ebx
110e0b: be 31 36 12 00 mov $0x123631,%esi
110e10: b9 0a 00 00 00 mov $0xa,%ecx
110e15: 89 df mov %ebx,%edi
110e17: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
110e19: 0f b7 05 2c 97 12 00 movzwl 0x12972c,%eax
110e20: 8d 50 01 lea 0x1(%eax),%edx
110e23: 66 89 15 2c 97 12 00 mov %dx,0x12972c
110e2a: 51 push %ecx
110e2b: 50 push %eax
110e2c: 68 3c 36 12 00 push $0x12363c
110e31: 8d 45 e3 lea -0x1d(%ebp),%eax
110e34: 50 push %eax
110e35: e8 e6 49 00 00 call 115820 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
110e3a: 58 pop %eax
110e3b: 5a pop %edx
110e3c: 68 80 01 00 00 push $0x180
110e41: 53 push %ebx
110e42: e8 2d 14 00 00 call 112274 <mkfifo>
110e47: 83 c4 10 add $0x10,%esp
110e4a: 85 c0 test %eax,%eax
110e4c: 0f 85 a6 00 00 00 jne 110ef8 <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);
110e52: 83 ec 08 sub $0x8,%esp
110e55: 68 00 40 00 00 push $0x4000
110e5a: 53 push %ebx
110e5b: e8 b8 90 ff ff call 109f18 <open>
110e60: 8b 55 08 mov 0x8(%ebp),%edx
110e63: 89 02 mov %eax,(%edx)
if (filsdes[0] < 0) {
110e65: 83 c4 10 add $0x10,%esp
110e68: 85 c0 test %eax,%eax
110e6a: 78 58 js 110ec4 <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]);
110e6c: 3b 05 6c 56 12 00 cmp 0x12566c,%eax
110e72: 72 3c jb 110eb0 <pipe_create+0xd4> <== ALWAYS TAKEN
110e74: 31 d2 xor %edx,%edx <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
110e76: 83 62 14 fe andl $0xfffffffe,0x14(%edx)
filsdes[1] = open(fifopath, O_WRONLY);
110e7a: 83 ec 08 sub $0x8,%esp
110e7d: 6a 01 push $0x1
110e7f: 53 push %ebx
110e80: e8 93 90 ff ff call 109f18 <open>
110e85: 8b 55 08 mov 0x8(%ebp),%edx
110e88: 89 42 04 mov %eax,0x4(%edx)
if (filsdes[1] < 0) {
110e8b: 83 c4 10 add $0x10,%esp
110e8e: 85 c0 test %eax,%eax
110e90: 78 4a js 110edc <pipe_create+0x100>
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
110e92: 31 f6 xor %esi,%esi
if (filsdes[1] < 0) {
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
110e94: 83 ec 0c sub $0xc,%esp
110e97: 53 push %ebx
110e98: e8 c7 b0 ff ff call 10bf64 <unlink>
110e9d: 83 c4 10 add $0x10,%esp
}
if(err != 0)
110ea0: 85 f6 test %esi,%esi
110ea2: 75 63 jne 110f07 <pipe_create+0x12b>
rtems_set_errno_and_return_minus_one(err);
return 0;
110ea4: 31 c0 xor %eax,%eax
}
110ea6: 8d 65 f4 lea -0xc(%ebp),%esp
110ea9: 5b pop %ebx
110eaa: 5e pop %esi
110eab: 5f pop %edi
110eac: c9 leave
110ead: c3 ret
110eae: 66 90 xchg %ax,%ax
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]);
110eb0: c1 e0 03 shl $0x3,%eax
110eb3: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
110eba: 29 c2 sub %eax,%edx
110ebc: 03 15 60 99 12 00 add 0x129960,%edx
110ec2: eb b2 jmp 110e76 <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;
110ec4: e8 bf 3f 00 00 call 114e88 <__errno>
110ec9: 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);
110ecb: 83 ec 0c sub $0xc,%esp
110ece: 53 push %ebx
110ecf: e8 90 b0 ff ff call 10bf64 <unlink>
110ed4: 83 c4 10 add $0x10,%esp
110ed7: eb c7 jmp 110ea0 <pipe_create+0xc4>
110ed9: 8d 76 00 lea 0x0(%esi),%esi
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
110edc: e8 a7 3f 00 00 call 114e88 <__errno>
110ee1: 8b 30 mov (%eax),%esi
close(filsdes[0]);
110ee3: 83 ec 0c sub $0xc,%esp
110ee6: 8b 45 08 mov 0x8(%ebp),%eax
110ee9: ff 30 pushl (%eax)
110eeb: e8 68 80 ff ff call 108f58 <close>
110ef0: 83 c4 10 add $0x10,%esp
110ef3: eb 9f jmp 110e94 <pipe_create+0xb8>
110ef5: 8d 76 00 lea 0x0(%esi),%esi
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){
110ef8: e8 8b 3f 00 00 call 114e88 <__errno>
return -1;
110efd: b8 ff ff ff ff mov $0xffffffff,%eax
110f02: e9 f9 fe ff ff jmp 110e00 <pipe_create+0x24>
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
110f07: e8 7c 3f 00 00 call 114e88 <__errno>
110f0c: 89 30 mov %esi,(%eax)
110f0e: b8 ff ff ff ff mov $0xffffffff,%eax
110f13: e9 e8 fe ff ff jmp 110e00 <pipe_create+0x24>
00112320 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
112320: 55 push %ebp
112321: 89 e5 mov %esp,%ebp
112323: 56 push %esi
112324: 53 push %ebx
112325: 8b 75 08 mov 0x8(%ebp),%esi
112328: 8b 5d 10 mov 0x10(%ebp),%ebx
if (cmd == FIONREAD) {
11232b: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp)
112332: 74 0c je 112340 <pipe_ioctl+0x20>
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
112334: b8 ea ff ff ff mov $0xffffffea,%eax
}
112339: 8d 65 f8 lea -0x8(%ebp),%esp
11233c: 5b pop %ebx
11233d: 5e pop %esi
11233e: c9 leave
11233f: c3 ret
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
112340: 85 db test %ebx,%ebx
112342: 75 07 jne 11234b <pipe_ioctl+0x2b>
return -EFAULT;
112344: b8 f2 ff ff ff mov $0xfffffff2,%eax
112349: eb ee jmp 112339 <pipe_ioctl+0x19>
if (! PIPE_LOCK(pipe))
11234b: 50 push %eax
11234c: 6a 00 push $0x0
11234e: 6a 00 push $0x0
112350: ff 76 28 pushl 0x28(%esi)
112353: e8 c4 b1 ff ff call 10d51c <rtems_semaphore_obtain>
112358: 83 c4 10 add $0x10,%esp
11235b: 85 c0 test %eax,%eax
11235d: 74 07 je 112366 <pipe_ioctl+0x46> <== ALWAYS TAKEN
return -EINTR;
11235f: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED
112364: eb d3 jmp 112339 <pipe_ioctl+0x19> <== NOT EXECUTED
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
112366: 8b 46 0c mov 0xc(%esi),%eax
112369: 89 03 mov %eax,(%ebx)
PIPE_UNLOCK(pipe);
11236b: 83 ec 0c sub $0xc,%esp
11236e: ff 76 28 pushl 0x28(%esi)
112371: e8 a2 b2 ff ff call 10d618 <rtems_semaphore_release>
return 0;
112376: 83 c4 10 add $0x10,%esp
112379: 31 c0 xor %eax,%eax
11237b: eb bc jmp 112339 <pipe_ioctl+0x19>
00111f68 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
111f68: 55 push %ebp
111f69: 89 e5 mov %esp,%ebp
111f6b: 57 push %edi
111f6c: 56 push %esi
111f6d: 53 push %ebx
111f6e: 83 ec 30 sub $0x30,%esp
111f71: 8b 5d 08 mov 0x8(%ebp),%ebx
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
111f74: 6a 00 push $0x0
111f76: 6a 00 push $0x0
111f78: ff 73 28 pushl 0x28(%ebx)
111f7b: e8 9c b5 ff ff call 10d51c <rtems_semaphore_obtain>
111f80: 83 c4 10 add $0x10,%esp
111f83: 85 c0 test %eax,%eax
111f85: 0f 85 ad 00 00 00 jne 112038 <pipe_read+0xd0> <== NEVER TAKEN
return -EINTR;
while (read < count) {
111f8b: 8b 55 10 mov 0x10(%ebp),%edx
111f8e: 85 d2 test %edx,%edx
111f90: 0f 84 7a 01 00 00 je 112110 <pipe_read+0x1a8> <== NEVER TAKEN
111f96: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
111f9d: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
while (PIPE_EMPTY(pipe)) {
111fa4: 8b 53 0c mov 0xc(%ebx),%edx
111fa7: 85 d2 test %edx,%edx
111fa9: 0f 85 99 00 00 00 jne 112048 <pipe_read+0xe0>
/* Not an error */
if (pipe->Writers == 0)
111faf: 8b 43 14 mov 0x14(%ebx),%eax
111fb2: 85 c0 test %eax,%eax
111fb4: 0f 84 fe 00 00 00 je 1120b8 <pipe_read+0x150>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
111fba: 8b 45 14 mov 0x14(%ebp),%eax
111fbd: f6 40 14 01 testb $0x1,0x14(%eax)
111fc1: 0f 85 f9 00 00 00 jne 1120c0 <pipe_read+0x158>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
111fc7: ff 43 18 incl 0x18(%ebx)
PIPE_UNLOCK(pipe);
111fca: 83 ec 0c sub $0xc,%esp
111fcd: ff 73 28 pushl 0x28(%ebx)
111fd0: e8 43 b6 ff ff call 10d618 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
111fd5: 5e pop %esi
111fd6: 5f pop %edi
111fd7: 6a 00 push $0x0
111fd9: ff 73 2c pushl 0x2c(%ebx)
111fdc: e8 03 19 00 00 call 1138e4 <rtems_barrier_wait>
111fe1: 83 c4 0c add $0xc,%esp
111fe4: 83 f8 01 cmp $0x1,%eax
111fe7: 19 f6 sbb %esi,%esi
111fe9: f7 d6 not %esi
111feb: 83 e6 fc and $0xfffffffc,%esi
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
111fee: 6a 00 push $0x0
111ff0: 6a 00 push $0x0
111ff2: ff 73 28 pushl 0x28(%ebx)
111ff5: e8 22 b5 ff ff call 10d51c <rtems_semaphore_obtain>
111ffa: 83 c4 10 add $0x10,%esp
111ffd: 85 c0 test %eax,%eax
111fff: 0f 85 c7 00 00 00 jne 1120cc <pipe_read+0x164> <== NEVER TAKEN
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
112005: ff 4b 18 decl 0x18(%ebx)
if (ret != 0)
112008: 85 f6 test %esi,%esi
11200a: 74 98 je 111fa4 <pipe_read+0x3c> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
11200c: 83 ec 0c sub $0xc,%esp
11200f: ff 73 28 pushl 0x28(%ebx)
112012: e8 01 b6 ff ff call 10d618 <rtems_semaphore_release>
112017: 83 c4 10 add $0x10,%esp
out_nolock:
if (read > 0)
11201a: 8b 55 d4 mov -0x2c(%ebp),%edx
11201d: 85 d2 test %edx,%edx
11201f: 7e 0b jle 11202c <pipe_read+0xc4>
112021: 8b 45 d4 mov -0x2c(%ebp),%eax
return read;
return ret;
}
112024: 8d 65 f4 lea -0xc(%ebp),%esp
112027: 5b pop %ebx
112028: 5e pop %esi
112029: 5f pop %edi
11202a: c9 leave
11202b: c3 ret
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
11202c: 89 f0 mov %esi,%eax
}
11202e: 8d 65 f4 lea -0xc(%ebp),%esp
112031: 5b pop %ebx
112032: 5e pop %esi
112033: 5f pop %edi
112034: c9 leave
112035: c3 ret
112036: 66 90 xchg %ax,%ax
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
112038: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
11203d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
112040: 5b pop %ebx <== NOT EXECUTED
112041: 5e pop %esi <== NOT EXECUTED
112042: 5f pop %edi <== NOT EXECUTED
112043: c9 leave <== NOT EXECUTED
112044: c3 ret <== NOT EXECUTED
112045: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
112048: 8b 45 10 mov 0x10(%ebp),%eax
11204b: 2b 45 d0 sub -0x30(%ebp),%eax
11204e: 89 55 cc mov %edx,-0x34(%ebp)
112051: 39 c2 cmp %eax,%edx
112053: 76 03 jbe 112058 <pipe_read+0xf0>
112055: 89 45 cc mov %eax,-0x34(%ebp)
chunk1 = pipe->Size - pipe->Start;
112058: 8b 73 08 mov 0x8(%ebx),%esi
11205b: 8b 43 04 mov 0x4(%ebx),%eax
11205e: 29 f0 sub %esi,%eax
if (chunk > chunk1) {
112060: 39 45 cc cmp %eax,-0x34(%ebp)
112063: 7f 71 jg 1120d6 <pipe_read+0x16e>
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);
112065: 8b 45 0c mov 0xc(%ebp),%eax
112068: 03 45 d0 add -0x30(%ebp),%eax
11206b: 03 33 add (%ebx),%esi
11206d: 89 c7 mov %eax,%edi
11206f: 8b 4d cc mov -0x34(%ebp),%ecx
112072: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
pipe->Start += chunk;
112074: 8b 45 cc mov -0x34(%ebp),%eax
112077: 03 43 08 add 0x8(%ebx),%eax
pipe->Start %= pipe->Size;
11207a: 31 d2 xor %edx,%edx
11207c: f7 73 04 divl 0x4(%ebx)
11207f: 89 53 08 mov %edx,0x8(%ebx)
pipe->Length -= chunk;
112082: 8b 43 0c mov 0xc(%ebx),%eax
112085: 2b 45 cc sub -0x34(%ebp),%eax
112088: 89 43 0c mov %eax,0xc(%ebx)
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
11208b: 85 c0 test %eax,%eax
11208d: 75 07 jne 112096 <pipe_read+0x12e>
pipe->Start = 0;
11208f: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
if (pipe->waitingWriters > 0)
112096: 8b 4b 1c mov 0x1c(%ebx),%ecx
112099: 85 c9 test %ecx,%ecx
11209b: 75 5f jne 1120fc <pipe_read+0x194>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
11209d: 8b 45 cc mov -0x34(%ebp),%eax
1120a0: 01 45 d4 add %eax,-0x2c(%ebp)
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
1120a3: 8b 45 d4 mov -0x2c(%ebp),%eax
1120a6: 89 45 d0 mov %eax,-0x30(%ebp)
1120a9: 8b 45 10 mov 0x10(%ebp),%eax
1120ac: 39 45 d4 cmp %eax,-0x2c(%ebp)
1120af: 0f 82 ef fe ff ff jb 111fa4 <pipe_read+0x3c> <== NEVER TAKEN
1120b5: 8d 76 00 lea 0x0(%esi),%esi
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
1120b8: 31 f6 xor %esi,%esi
1120ba: e9 4d ff ff ff jmp 11200c <pipe_read+0xa4>
1120bf: 90 nop
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
1120c0: be f5 ff ff ff mov $0xfffffff5,%esi
1120c5: e9 42 ff ff ff jmp 11200c <pipe_read+0xa4>
1120ca: 66 90 xchg %ax,%ax
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
1120cc: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED
1120d1: e9 44 ff ff ff jmp 11201a <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);
1120d6: 8b 55 0c mov 0xc(%ebp),%edx
1120d9: 03 55 d0 add -0x30(%ebp),%edx
1120dc: 03 33 add (%ebx),%esi
1120de: 89 d7 mov %edx,%edi
1120e0: 89 c1 mov %eax,%ecx
1120e2: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
1120e4: 8b 55 d0 mov -0x30(%ebp),%edx
1120e7: 01 c2 add %eax,%edx
1120e9: 03 55 0c add 0xc(%ebp),%edx
1120ec: 8b 4d cc mov -0x34(%ebp),%ecx
1120ef: 29 c1 sub %eax,%ecx
1120f1: 8b 33 mov (%ebx),%esi
1120f3: 89 d7 mov %edx,%edi
1120f5: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
1120f7: e9 78 ff ff ff jmp 112074 <pipe_read+0x10c>
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
1120fc: 83 ec 08 sub $0x8,%esp
1120ff: 8d 45 e4 lea -0x1c(%ebp),%eax
112102: 50 push %eax
112103: ff 73 30 pushl 0x30(%ebx)
112106: e8 75 17 00 00 call 113880 <rtems_barrier_release>
11210b: 83 c4 10 add $0x10,%esp
11210e: eb 8d jmp 11209d <pipe_read+0x135>
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
112110: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED
112117: 31 f6 xor %esi,%esi <== NOT EXECUTED
112119: e9 ee fe ff ff jmp 11200c <pipe_read+0xa4> <== NOT EXECUTED
00111a14 <pipe_release>:
*/
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
111a14: 55 push %ebp
111a15: 89 e5 mov %esp,%ebp
111a17: 57 push %edi
111a18: 56 push %esi
111a19: 53 push %ebx
111a1a: 83 ec 1c sub $0x1c,%esp
111a1d: 8b 7d 08 mov 0x8(%ebp),%edi
pipe_control_t *pipe = *pipep;
111a20: 8b 1f mov (%edi),%ebx
/* WARN pipe not released! */
if (!PIPE_LOCK(pipe))
rtems_fatal_error_occurred(0xdeadbeef);
#endif
mode = LIBIO_ACCMODE(iop);
111a22: 8b 45 0c mov 0xc(%ebp),%eax
111a25: 8b 40 14 mov 0x14(%eax),%eax
111a28: 89 c6 mov %eax,%esi
111a2a: 83 e6 06 and $0x6,%esi
if (mode & LIBIO_FLAGS_READ)
111a2d: a8 02 test $0x2,%al
111a2f: 74 03 je 111a34 <pipe_release+0x20>
pipe->Readers --;
111a31: ff 4b 10 decl 0x10(%ebx)
if (mode & LIBIO_FLAGS_WRITE)
111a34: f7 c6 04 00 00 00 test $0x4,%esi
111a3a: 74 03 je 111a3f <pipe_release+0x2b>
pipe->Writers --;
111a3c: ff 4b 14 decl 0x14(%ebx)
PIPE_UNLOCK(pipe);
111a3f: 83 ec 0c sub $0xc,%esp
111a42: ff 73 28 pushl 0x28(%ebx)
111a45: e8 ce bb ff ff call 10d618 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
111a4a: 83 c4 10 add $0x10,%esp
111a4d: 8b 53 10 mov 0x10(%ebx),%edx
111a50: 85 d2 test %edx,%edx
111a52: 74 2c je 111a80 <pipe_release+0x6c>
*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)
111a54: 8b 43 14 mov 0x14(%ebx),%eax
111a57: 85 c0 test %eax,%eax
111a59: 75 17 jne 111a72 <pipe_release+0x5e> <== NEVER TAKEN
111a5b: 83 fe 02 cmp $0x2,%esi
111a5e: 74 12 je 111a72 <pipe_release+0x5e> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
111a60: 83 ec 08 sub $0x8,%esp
111a63: 8d 45 e4 lea -0x1c(%ebp),%eax
111a66: 50 push %eax
111a67: ff 73 2c pushl 0x2c(%ebx)
111a6a: e8 11 1e 00 00 call 113880 <rtems_barrier_release>
111a6f: 83 c4 10 add $0x10,%esp
pipe_unlock();
111a72: e8 85 ff ff ff call 1119fc <pipe_unlock>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
111a77: 8d 65 f4 lea -0xc(%ebp),%esp
111a7a: 5b pop %ebx
111a7b: 5e pop %esi
111a7c: 5f pop %edi
111a7d: c9 leave
111a7e: c3 ret
111a7f: 90 nop
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
111a80: 8b 43 14 mov 0x14(%ebx),%eax
111a83: 85 c0 test %eax,%eax
111a85: 74 25 je 111aac <pipe_release+0x98>
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
111a87: 83 fe 04 cmp $0x4,%esi
111a8a: 74 e6 je 111a72 <pipe_release+0x5e> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
111a8c: 83 ec 08 sub $0x8,%esp
111a8f: 8d 45 e4 lea -0x1c(%ebp),%eax
111a92: 50 push %eax
111a93: ff 73 30 pushl 0x30(%ebx)
111a96: e8 e5 1d 00 00 call 113880 <rtems_barrier_release>
111a9b: 83 c4 10 add $0x10,%esp
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
pipe_unlock();
111a9e: e8 59 ff ff ff call 1119fc <pipe_unlock>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
111aa3: 8d 65 f4 lea -0xc(%ebp),%esp
111aa6: 5b pop %ebx
111aa7: 5e pop %esi
111aa8: 5f pop %edi
111aa9: c9 leave
111aaa: c3 ret
111aab: 90 nop
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
111aac: 83 ec 0c sub $0xc,%esp
111aaf: ff 73 2c pushl 0x2c(%ebx)
111ab2: e8 39 1d 00 00 call 1137f0 <rtems_barrier_delete>
rtems_barrier_delete(pipe->writeBarrier);
111ab7: 5e pop %esi
111ab8: ff 73 30 pushl 0x30(%ebx)
111abb: e8 30 1d 00 00 call 1137f0 <rtems_barrier_delete>
rtems_semaphore_delete(pipe->Semaphore);
111ac0: 59 pop %ecx
111ac1: ff 73 28 pushl 0x28(%ebx)
111ac4: e8 af b9 ff ff call 10d478 <rtems_semaphore_delete>
free(pipe->Buffer);
111ac9: 5a pop %edx
111aca: ff 33 pushl (%ebx)
111acc: e8 1f 7f ff ff call 1099f0 <free>
free(pipe);
111ad1: 89 1c 24 mov %ebx,(%esp)
111ad4: e8 17 7f ff ff call 1099f0 <free>
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
111ad9: c7 07 00 00 00 00 movl $0x0,(%edi)
111adf: 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();
111ae2: e8 15 ff ff ff call 1119fc <pipe_unlock>
iop->flags &= ~LIBIO_FLAGS_OPEN;
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return;
#endif
}
111ae7: 8d 65 f4 lea -0xc(%ebp),%esp
111aea: 5b pop %ebx
111aeb: 5e pop %esi
111aec: 5f pop %edi
111aed: c9 leave
111aee: c3 ret
00112120 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
112120: 55 push %ebp
112121: 89 e5 mov %esp,%ebp
112123: 57 push %edi
112124: 56 push %esi
112125: 53 push %ebx
112126: 83 ec 2c sub $0x2c,%esp
112129: 8b 5d 10 mov 0x10(%ebp),%ebx
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
11212c: 85 db test %ebx,%ebx
11212e: 75 0c jne 11213c <pipe_write+0x1c> <== ALWAYS TAKEN
return 0;
112130: 31 c0 xor %eax,%eax
#endif
if (written > 0)
return written;
return ret;
}
112132: 8d 65 f4 lea -0xc(%ebp),%esp
112135: 5b pop %ebx
112136: 5e pop %esi
112137: 5f pop %edi
112138: c9 leave
112139: c3 ret
11213a: 66 90 xchg %ax,%ax
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
11213c: 56 push %esi
11213d: 6a 00 push $0x0
11213f: 6a 00 push $0x0
112141: 8b 45 08 mov 0x8(%ebp),%eax
112144: ff 70 28 pushl 0x28(%eax)
112147: e8 d0 b3 ff ff call 10d51c <rtems_semaphore_obtain>
11214c: 83 c4 10 add $0x10,%esp
11214f: 85 c0 test %eax,%eax
112151: 0f 85 4a 01 00 00 jne 1122a1 <pipe_write+0x181> <== NEVER TAKEN
return -EINTR;
if (pipe->Readers == 0) {
112157: 8b 45 08 mov 0x8(%ebp),%eax
11215a: 8b 48 10 mov 0x10(%eax),%ecx
11215d: 85 c9 test %ecx,%ecx
11215f: 0f 84 57 01 00 00 je 1122bc <pipe_write+0x19c>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
112165: 8b 48 04 mov 0x4(%eax),%ecx
112168: 39 cb cmp %ecx,%ebx
11216a: 0f 87 42 01 00 00 ja 1122b2 <pipe_write+0x192> <== NEVER TAKEN
112170: 89 de mov %ebx,%esi
112172: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
112179: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
112180: 89 5d c8 mov %ebx,-0x38(%ebp)
112183: 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) {
112186: 8b 43 0c mov 0xc(%ebx),%eax
112189: 89 ca mov %ecx,%edx
11218b: 29 c2 sub %eax,%edx
11218d: 39 f2 cmp %esi,%edx
11218f: 73 6f jae 112200 <pipe_write+0xe0>
if (LIBIO_NODELAY(iop)) {
112191: 8b 45 14 mov 0x14(%ebp),%eax
112194: f6 40 14 01 testb $0x1,0x14(%eax)
112198: 0f 85 48 01 00 00 jne 1122e6 <pipe_write+0x1c6>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
11219e: ff 43 1c incl 0x1c(%ebx)
PIPE_UNLOCK(pipe);
1121a1: 83 ec 0c sub $0xc,%esp
1121a4: ff 73 28 pushl 0x28(%ebx)
1121a7: e8 6c b4 ff ff call 10d618 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
1121ac: 58 pop %eax
1121ad: 5a pop %edx
1121ae: 6a 00 push $0x0
1121b0: ff 73 30 pushl 0x30(%ebx)
1121b3: e8 2c 17 00 00 call 1138e4 <rtems_barrier_wait>
1121b8: 83 c4 0c add $0xc,%esp
1121bb: 83 f8 01 cmp $0x1,%eax
1121be: 19 ff sbb %edi,%edi
1121c0: f7 d7 not %edi
1121c2: 83 e7 fc and $0xfffffffc,%edi
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
1121c5: 6a 00 push $0x0
1121c7: 6a 00 push $0x0
1121c9: ff 73 28 pushl 0x28(%ebx)
1121cc: e8 4b b3 ff ff call 10d51c <rtems_semaphore_obtain>
1121d1: 83 c4 10 add $0x10,%esp
1121d4: 85 c0 test %eax,%eax
1121d6: 0f 85 03 01 00 00 jne 1122df <pipe_write+0x1bf> <== NEVER TAKEN
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
1121dc: ff 4b 1c decl 0x1c(%ebx)
if (ret != 0)
1121df: 85 ff test %edi,%edi
1121e1: 0f 85 95 00 00 00 jne 11227c <pipe_write+0x15c> <== NEVER TAKEN
goto out_locked;
if (pipe->Readers == 0) {
1121e7: 8b 7b 10 mov 0x10(%ebx),%edi
1121ea: 85 ff test %edi,%edi
1121ec: 0f 84 85 00 00 00 je 112277 <pipe_write+0x157> <== NEVER TAKEN
1121f2: 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) {
1121f5: 8b 43 0c mov 0xc(%ebx),%eax
1121f8: 89 ca mov %ecx,%edx
1121fa: 29 c2 sub %eax,%edx
1121fc: 39 f2 cmp %esi,%edx
1121fe: 72 91 jb 112191 <pipe_write+0x71> <== NEVER TAKEN
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
112200: 8b 75 c8 mov -0x38(%ebp),%esi
112203: 2b 75 d0 sub -0x30(%ebp),%esi
112206: 89 55 cc mov %edx,-0x34(%ebp)
112209: 39 f2 cmp %esi,%edx
11220b: 76 03 jbe 112210 <pipe_write+0xf0>
11220d: 89 75 cc mov %esi,-0x34(%ebp)
chunk1 = pipe->Size - PIPE_WSTART(pipe);
112210: 03 43 08 add 0x8(%ebx),%eax
112213: 31 d2 xor %edx,%edx
112215: f7 f1 div %ecx
112217: 89 c8 mov %ecx,%eax
112219: 29 d0 sub %edx,%eax
if (chunk > chunk1) {
11221b: 39 45 cc cmp %eax,-0x34(%ebp)
11221e: 0f 8e c9 00 00 00 jle 1122ed <pipe_write+0x1cd>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
112224: 03 13 add (%ebx),%edx
112226: 8b 75 0c mov 0xc(%ebp),%esi
112229: 03 75 d0 add -0x30(%ebp),%esi
11222c: 89 d7 mov %edx,%edi
11222e: 89 c1 mov %eax,%ecx
112230: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
112232: 8b 13 mov (%ebx),%edx
112234: 8b 4d cc mov -0x34(%ebp),%ecx
112237: 29 c1 sub %eax,%ecx
112239: 03 45 d0 add -0x30(%ebp),%eax
11223c: 8b 75 0c mov 0xc(%ebp),%esi
11223f: 01 c6 add %eax,%esi
112241: 89 d7 mov %edx,%edi
112243: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
112245: 8b 45 cc mov -0x34(%ebp),%eax
112248: 01 43 0c add %eax,0xc(%ebx)
if (pipe->waitingReaders > 0)
11224b: 83 7b 18 00 cmpl $0x0,0x18(%ebx)
11224f: 0f 85 ac 00 00 00 jne 112301 <pipe_write+0x1e1>
PIPE_WAKEUPREADERS(pipe);
written += chunk;
112255: 8b 45 cc mov -0x34(%ebp),%eax
112258: 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) {
11225b: 8b 45 d4 mov -0x2c(%ebp),%eax
11225e: 89 45 d0 mov %eax,-0x30(%ebp)
112261: 39 45 c8 cmp %eax,-0x38(%ebp)
112264: 0f 86 ad 00 00 00 jbe 112317 <pipe_write+0x1f7> <== ALWAYS TAKEN
11226a: 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;
11226d: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
112272: e9 0f ff ff ff jmp 112186 <pipe_write+0x66> <== NOT EXECUTED
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
112277: bf e0 ff ff ff mov $0xffffffe0,%edi <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
11227c: 83 ec 0c sub $0xc,%esp
11227f: 8b 45 08 mov 0x8(%ebp),%eax
112282: ff 70 28 pushl 0x28(%eax)
112285: e8 8e b3 ff ff call 10d618 <rtems_semaphore_release>
11228a: 83 c4 10 add $0x10,%esp
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
11228d: 83 ff e0 cmp $0xffffffe0,%edi
112290: 74 38 je 1122ca <pipe_write+0x1aa>
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
112292: 8b 4d d4 mov -0x2c(%ebp),%ecx
112295: 85 c9 test %ecx,%ecx
112297: 7e 12 jle 1122ab <pipe_write+0x18b>
112299: 8b 45 d4 mov -0x2c(%ebp),%eax
11229c: e9 91 fe ff ff jmp 112132 <pipe_write+0x12>
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
1122a1: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED
1122a6: e9 87 fe ff ff jmp 112132 <pipe_write+0x12> <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
1122ab: 89 f8 mov %edi,%eax
1122ad: e9 80 fe ff ff jmp 112132 <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;
1122b2: be 01 00 00 00 mov $0x1,%esi <== NOT EXECUTED
1122b7: e9 b6 fe ff ff jmp 112172 <pipe_write+0x52> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
1122bc: bf e0 ff ff ff mov $0xffffffe0,%edi
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
1122c1: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
1122c8: eb b2 jmp 11227c <pipe_write+0x15c>
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
1122ca: e8 21 08 00 00 call 112af0 <getpid>
1122cf: 83 ec 08 sub $0x8,%esp
1122d2: 6a 0d push $0xd
1122d4: 50 push %eax
1122d5: e8 1a 0b 00 00 call 112df4 <kill>
1122da: 83 c4 10 add $0x10,%esp
1122dd: eb b3 jmp 112292 <pipe_write+0x172>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
1122df: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED
1122e4: eb ac jmp 112292 <pipe_write+0x172> <== NOT EXECUTED
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
1122e6: bf f5 ff ff ff mov $0xfffffff5,%edi
1122eb: eb 8f jmp 11227c <pipe_write+0x15c>
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);
1122ed: 03 13 add (%ebx),%edx
1122ef: 8b 75 0c mov 0xc(%ebp),%esi
1122f2: 03 75 d0 add -0x30(%ebp),%esi
1122f5: 89 d7 mov %edx,%edi
1122f7: 8b 4d cc mov -0x34(%ebp),%ecx
1122fa: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
1122fc: e9 44 ff ff ff jmp 112245 <pipe_write+0x125>
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
112301: 56 push %esi
112302: 56 push %esi
112303: 8d 45 e4 lea -0x1c(%ebp),%eax
112306: 50 push %eax
112307: ff 73 2c pushl 0x2c(%ebx)
11230a: e8 71 15 00 00 call 113880 <rtems_barrier_release>
11230f: 83 c4 10 add $0x10,%esp
112312: e9 3e ff ff ff jmp 112255 <pipe_write+0x135>
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
112317: 31 ff xor %edi,%edi
112319: e9 5e ff ff ff jmp 11227c <pipe_write+0x15c>
0010bb78 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
10bb78: 55 push %ebp
10bb79: 89 e5 mov %esp,%ebp
10bb7b: 53 push %ebx
10bb7c: 83 ec 04 sub $0x4,%esp
10bb7f: 8b 45 0c mov 0xc(%ebp),%eax
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
10bb82: ff 05 68 ed 12 00 incl 0x12ed68
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
10bb88: 8d 50 ff lea -0x1(%eax),%edx
10bb8b: 85 c2 test %eax,%edx
10bb8d: 75 05 jne 10bb94 <posix_memalign+0x1c> <== NEVER TAKEN
10bb8f: 83 f8 03 cmp $0x3,%eax
10bb92: 77 0c ja 10bba0 <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 );
}
10bb94: b8 16 00 00 00 mov $0x16,%eax
10bb99: 5a pop %edx
10bb9a: 5b pop %ebx
10bb9b: c9 leave
10bb9c: c3 ret
10bb9d: 8d 76 00 lea 0x0(%esi),%esi
10bba0: 59 pop %ecx
10bba1: 5b pop %ebx
10bba2: c9 leave
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
10bba3: e9 78 01 00 00 jmp 10bd20 <rtems_memalign>
00110998 <pthread_attr_destroy>:
#include <rtems/system.h>
int pthread_attr_destroy(
pthread_attr_t *attr
)
{
110998: 55 push %ebp
110999: 89 e5 mov %esp,%ebp
11099b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
11099e: 85 c0 test %eax,%eax
1109a0: 74 12 je 1109b4 <pthread_attr_destroy+0x1c>
1109a2: 8b 10 mov (%eax),%edx
1109a4: 85 d2 test %edx,%edx
1109a6: 74 0c je 1109b4 <pthread_attr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
1109a8: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
1109ae: 31 c0 xor %eax,%eax
}
1109b0: c9 leave
1109b1: c3 ret
1109b2: 66 90 xchg %ax,%ax
int pthread_attr_destroy(
pthread_attr_t *attr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
1109b4: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
1109b9: c9 leave
1109ba: c3 ret
00110ae4 <pthread_attr_getstack>:
int pthread_attr_getstack(
const pthread_attr_t *attr,
void **stackaddr,
size_t *stacksize
)
{
110ae4: 55 push %ebp
110ae5: 89 e5 mov %esp,%ebp
110ae7: 53 push %ebx
110ae8: 8b 45 08 mov 0x8(%ebp),%eax
110aeb: 8b 55 0c mov 0xc(%ebp),%edx
110aee: 8b 4d 10 mov 0x10(%ebp),%ecx
if ( !attr || !attr->is_initialized || !stackaddr || !stacksize )
110af1: 85 c0 test %eax,%eax
110af3: 74 1f je 110b14 <pthread_attr_getstack+0x30>
110af5: 8b 18 mov (%eax),%ebx
110af7: 85 db test %ebx,%ebx
110af9: 74 19 je 110b14 <pthread_attr_getstack+0x30>
110afb: 85 d2 test %edx,%edx
110afd: 74 15 je 110b14 <pthread_attr_getstack+0x30>
110aff: 85 c9 test %ecx,%ecx
110b01: 74 11 je 110b14 <pthread_attr_getstack+0x30>
return EINVAL;
*stackaddr = attr->stackaddr;
110b03: 8b 58 04 mov 0x4(%eax),%ebx
110b06: 89 1a mov %ebx,(%edx)
*stacksize = attr->stacksize;
110b08: 8b 40 08 mov 0x8(%eax),%eax
110b0b: 89 01 mov %eax,(%ecx)
return 0;
110b0d: 31 c0 xor %eax,%eax
}
110b0f: 5b pop %ebx
110b10: c9 leave
110b11: c3 ret
110b12: 66 90 xchg %ax,%ax
void **stackaddr,
size_t *stacksize
)
{
if ( !attr || !attr->is_initialized || !stackaddr || !stacksize )
return EINVAL;
110b14: b8 16 00 00 00 mov $0x16,%eax
*stackaddr = attr->stackaddr;
*stacksize = attr->stacksize;
return 0;
}
110b19: 5b pop %ebx
110b1a: c9 leave
110b1b: c3 ret
00110b98 <pthread_attr_setguardsize>:
int pthread_attr_setguardsize(
pthread_attr_t *attr,
size_t guardsize
)
{
110b98: 55 push %ebp
110b99: 89 e5 mov %esp,%ebp
110b9b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
110b9e: 85 c0 test %eax,%eax
110ba0: 74 12 je 110bb4 <pthread_attr_setguardsize+0x1c>
110ba2: 8b 10 mov (%eax),%edx
110ba4: 85 d2 test %edx,%edx
110ba6: 74 0c je 110bb4 <pthread_attr_setguardsize+0x1c>
return EINVAL;
attr->guardsize = guardsize;
110ba8: 8b 55 0c mov 0xc(%ebp),%edx
110bab: 89 50 34 mov %edx,0x34(%eax)
return 0;
110bae: 31 c0 xor %eax,%eax
}
110bb0: c9 leave
110bb1: c3 ret
110bb2: 66 90 xchg %ax,%ax
pthread_attr_t *attr,
size_t guardsize
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
110bb4: b8 16 00 00 00 mov $0x16,%eax
attr->guardsize = guardsize;
return 0;
}
110bb9: c9 leave
110bba: c3 ret
00111bcc <pthread_attr_setinheritsched>:
int pthread_attr_setinheritsched(
pthread_attr_t *attr,
int inheritsched
)
{
111bcc: 55 push %ebp
111bcd: 89 e5 mov %esp,%ebp
111bcf: 8b 45 08 mov 0x8(%ebp),%eax
111bd2: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
111bd5: 85 c0 test %eax,%eax
111bd7: 74 1f je 111bf8 <pthread_attr_setinheritsched+0x2c>
111bd9: 8b 08 mov (%eax),%ecx
111bdb: 85 c9 test %ecx,%ecx
111bdd: 74 19 je 111bf8 <pthread_attr_setinheritsched+0x2c>
return EINVAL;
switch ( inheritsched ) {
111bdf: 8d 4a ff lea -0x1(%edx),%ecx
111be2: 83 f9 01 cmp $0x1,%ecx
111be5: 76 09 jbe 111bf0 <pthread_attr_setinheritsched+0x24>
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
return 0;
default:
return ENOTSUP;
111be7: b8 86 00 00 00 mov $0x86,%eax
}
}
111bec: c9 leave
111bed: c3 ret
111bee: 66 90 xchg %ax,%ax
return EINVAL;
switch ( inheritsched ) {
case PTHREAD_INHERIT_SCHED:
case PTHREAD_EXPLICIT_SCHED:
attr->inheritsched = inheritsched;
111bf0: 89 50 10 mov %edx,0x10(%eax)
return 0;
111bf3: 31 c0 xor %eax,%eax
default:
return ENOTSUP;
}
}
111bf5: c9 leave
111bf6: c3 ret
111bf7: 90 nop
pthread_attr_t *attr,
int inheritsched
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
111bf8: b8 16 00 00 00 mov $0x16,%eax
return 0;
default:
return ENOTSUP;
}
}
111bfd: c9 leave
111bfe: c3 ret
00110bf0 <pthread_attr_setschedparam>:
int pthread_attr_setschedparam(
pthread_attr_t *attr,
const struct sched_param *param
)
{
110bf0: 55 push %ebp
110bf1: 89 e5 mov %esp,%ebp
110bf3: 57 push %edi
110bf4: 56 push %esi
110bf5: 8b 7d 08 mov 0x8(%ebp),%edi
110bf8: 8b 75 0c mov 0xc(%ebp),%esi
if ( !attr || !attr->is_initialized || !param )
110bfb: 85 ff test %edi,%edi
110bfd: 74 1d je 110c1c <pthread_attr_setschedparam+0x2c>
110bff: 8b 07 mov (%edi),%eax
110c01: 85 c0 test %eax,%eax
110c03: 74 17 je 110c1c <pthread_attr_setschedparam+0x2c>
110c05: 85 f6 test %esi,%esi
110c07: 74 13 je 110c1c <pthread_attr_setschedparam+0x2c>
return EINVAL;
attr->schedparam = *param;
110c09: 83 c7 18 add $0x18,%edi
110c0c: b9 07 00 00 00 mov $0x7,%ecx
110c11: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return 0;
110c13: 31 c0 xor %eax,%eax
}
110c15: 5e pop %esi
110c16: 5f pop %edi
110c17: c9 leave
110c18: c3 ret
110c19: 8d 76 00 lea 0x0(%esi),%esi
pthread_attr_t *attr,
const struct sched_param *param
)
{
if ( !attr || !attr->is_initialized || !param )
return EINVAL;
110c1c: b8 16 00 00 00 mov $0x16,%eax
attr->schedparam = *param;
return 0;
}
110c21: 5e pop %esi
110c22: 5f pop %edi
110c23: c9 leave
110c24: c3 ret
00110c28 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
110c28: 55 push %ebp
110c29: 89 e5 mov %esp,%ebp
110c2b: 8b 45 08 mov 0x8(%ebp),%eax
110c2e: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
110c31: 85 c0 test %eax,%eax
110c33: 74 23 je 110c58 <pthread_attr_setschedpolicy+0x30>
110c35: 8b 08 mov (%eax),%ecx
110c37: 85 c9 test %ecx,%ecx
110c39: 74 1d je 110c58 <pthread_attr_setschedpolicy+0x30>
return EINVAL;
switch ( policy ) {
110c3b: 85 d2 test %edx,%edx
110c3d: 78 0a js 110c49 <pthread_attr_setschedpolicy+0x21>
110c3f: 83 fa 02 cmp $0x2,%edx
110c42: 7e 0c jle 110c50 <pthread_attr_setschedpolicy+0x28>
110c44: 83 fa 04 cmp $0x4,%edx
110c47: 74 07 je 110c50 <pthread_attr_setschedpolicy+0x28><== ALWAYS TAKEN
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
110c49: b8 86 00 00 00 mov $0x86,%eax
}
}
110c4e: c9 leave
110c4f: c3 ret
switch ( policy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
110c50: 89 50 14 mov %edx,0x14(%eax)
return 0;
110c53: 31 c0 xor %eax,%eax
default:
return ENOTSUP;
}
}
110c55: c9 leave
110c56: c3 ret
110c57: 90 nop
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
110c58: b8 16 00 00 00 mov $0x16,%eax
return 0;
default:
return ENOTSUP;
}
}
110c5d: c9 leave
110c5e: c3 ret
00110c60 <pthread_attr_setscope>:
int pthread_attr_setscope(
pthread_attr_t *attr,
int contentionscope
)
{
110c60: 55 push %ebp
110c61: 89 e5 mov %esp,%ebp
110c63: 8b 45 08 mov 0x8(%ebp),%eax
110c66: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
110c69: 85 c0 test %eax,%eax
110c6b: 74 1a je 110c87 <pthread_attr_setscope+0x27>
110c6d: 8b 08 mov (%eax),%ecx
110c6f: 85 c9 test %ecx,%ecx
110c71: 74 14 je 110c87 <pthread_attr_setscope+0x27>
return EINVAL;
switch ( contentionscope ) {
110c73: 85 d2 test %edx,%edx
110c75: 75 0d jne 110c84 <pthread_attr_setscope+0x24>
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
110c77: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
return 0;
110c7e: 31 c0 xor %eax,%eax
return ENOTSUP;
default:
return EINVAL;
}
}
110c80: c9 leave
110c81: c3 ret
110c82: 66 90 xchg %ax,%ax
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( contentionscope ) {
110c84: 4a dec %edx
110c85: 74 09 je 110c90 <pthread_attr_setscope+0x30>
case PTHREAD_SCOPE_SYSTEM:
return ENOTSUP;
default:
return EINVAL;
110c87: b8 16 00 00 00 mov $0x16,%eax
}
}
110c8c: c9 leave
110c8d: c3 ret
110c8e: 66 90 xchg %ax,%ax
case PTHREAD_SCOPE_PROCESS:
attr->contentionscope = contentionscope;
return 0;
case PTHREAD_SCOPE_SYSTEM:
return ENOTSUP;
110c90: b8 86 00 00 00 mov $0x86,%eax
default:
return EINVAL;
}
}
110c95: c9 leave
110c96: c3 ret
00110cbc <pthread_attr_setstack>:
int pthread_attr_setstack(
pthread_attr_t *attr,
void *stackaddr,
size_t stacksize
)
{
110cbc: 55 push %ebp
110cbd: 89 e5 mov %esp,%ebp
110cbf: 8b 45 08 mov 0x8(%ebp),%eax
110cc2: 8b 55 10 mov 0x10(%ebp),%edx
if ( !attr || !attr->is_initialized )
110cc5: 85 c0 test %eax,%eax
110cc7: 74 27 je 110cf0 <pthread_attr_setstack+0x34>
110cc9: 8b 08 mov (%eax),%ecx
110ccb: 85 c9 test %ecx,%ecx
110ccd: 74 21 je 110cf0 <pthread_attr_setstack+0x34>
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
110ccf: 8b 0d 98 e4 12 00 mov 0x12e498,%ecx
110cd5: d1 e1 shl %ecx
110cd7: 39 d1 cmp %edx,%ecx
110cd9: 77 0d ja 110ce8 <pthread_attr_setstack+0x2c>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
110cdb: 89 50 08 mov %edx,0x8(%eax)
attr->stackaddr = stackaddr;
110cde: 8b 55 0c mov 0xc(%ebp),%edx
110ce1: 89 50 04 mov %edx,0x4(%eax)
return 0;
110ce4: 31 c0 xor %eax,%eax
}
110ce6: c9 leave
110ce7: c3 ret
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
110ce8: 89 48 08 mov %ecx,0x8(%eax)
110ceb: eb f1 jmp 110cde <pthread_attr_setstack+0x22>
110ced: 8d 76 00 lea 0x0(%esi),%esi
void *stackaddr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
110cf0: b8 16 00 00 00 mov $0x16,%eax
else
attr->stacksize = stacksize;
attr->stackaddr = stackaddr;
return 0;
}
110cf5: c9 leave
110cf6: c3 ret
00110c98 <pthread_attr_setstackaddr>:
int pthread_attr_setstackaddr(
pthread_attr_t *attr,
void *stackaddr
)
{
110c98: 55 push %ebp
110c99: 89 e5 mov %esp,%ebp
110c9b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
110c9e: 85 c0 test %eax,%eax
110ca0: 74 12 je 110cb4 <pthread_attr_setstackaddr+0x1c>
110ca2: 8b 10 mov (%eax),%edx
110ca4: 85 d2 test %edx,%edx
110ca6: 74 0c je 110cb4 <pthread_attr_setstackaddr+0x1c>
return EINVAL;
attr->stackaddr = stackaddr;
110ca8: 8b 55 0c mov 0xc(%ebp),%edx
110cab: 89 50 04 mov %edx,0x4(%eax)
return 0;
110cae: 31 c0 xor %eax,%eax
}
110cb0: c9 leave
110cb1: c3 ret
110cb2: 66 90 xchg %ax,%ax
pthread_attr_t *attr,
void *stackaddr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
110cb4: b8 16 00 00 00 mov $0x16,%eax
attr->stackaddr = stackaddr;
return 0;
}
110cb9: c9 leave
110cba: c3 ret
00111c00 <pthread_attr_setstacksize>:
int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize
)
{
111c00: 55 push %ebp
111c01: 89 e5 mov %esp,%ebp
111c03: 8b 45 08 mov 0x8(%ebp),%eax
111c06: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
111c09: 85 c0 test %eax,%eax
111c0b: 74 23 je 111c30 <pthread_attr_setstacksize+0x30>
111c0d: 8b 08 mov (%eax),%ecx
111c0f: 85 c9 test %ecx,%ecx
111c11: 74 1d je 111c30 <pthread_attr_setstacksize+0x30>
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
111c13: 8b 0d 38 4e 12 00 mov 0x124e38,%ecx
111c19: d1 e1 shl %ecx
111c1b: 39 d1 cmp %edx,%ecx
111c1d: 77 09 ja 111c28 <pthread_attr_setstacksize+0x28>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
111c1f: 89 50 08 mov %edx,0x8(%eax)
return 0;
111c22: 31 c0 xor %eax,%eax
}
111c24: c9 leave
111c25: c3 ret
111c26: 66 90 xchg %ax,%ax
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
111c28: 89 48 08 mov %ecx,0x8(%eax)
else
attr->stacksize = stacksize;
return 0;
111c2b: 31 c0 xor %eax,%eax
}
111c2d: c9 leave
111c2e: c3 ret
111c2f: 90 nop
pthread_attr_t *attr,
size_t stacksize
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
111c30: 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;
}
111c35: c9 leave
111c36: c3 ret
0010b9e4 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
10b9e4: 55 push %ebp
10b9e5: 89 e5 mov %esp,%ebp
10b9e7: 57 push %edi
10b9e8: 56 push %esi
10b9e9: 53 push %ebx
10b9ea: 83 ec 2c sub $0x2c,%esp
10b9ed: 8b 5d 08 mov 0x8(%ebp),%ebx
10b9f0: 8b 7d 0c mov 0xc(%ebp),%edi
10b9f3: 8b 75 10 mov 0x10(%ebp),%esi
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
10b9f6: 85 db test %ebx,%ebx
10b9f8: 0f 84 82 00 00 00 je 10ba80 <pthread_barrier_init+0x9c>
return EINVAL;
if ( count == 0 )
10b9fe: 85 f6 test %esi,%esi
10ba00: 74 7e je 10ba80 <pthread_barrier_init+0x9c>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10ba02: 85 ff test %edi,%edi
10ba04: 0f 84 92 00 00 00 je 10ba9c <pthread_barrier_init+0xb8>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10ba0a: 8b 17 mov (%edi),%edx
10ba0c: 85 d2 test %edx,%edx
10ba0e: 74 70 je 10ba80 <pthread_barrier_init+0x9c>
return EINVAL;
switch ( the_attr->process_shared ) {
10ba10: 8b 47 04 mov 0x4(%edi),%eax
10ba13: 85 c0 test %eax,%eax
10ba15: 75 69 jne 10ba80 <pthread_barrier_init+0x9c><== NEVER TAKEN
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
10ba17: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
the_attributes.maximum_count = count;
10ba1e: 89 75 e4 mov %esi,-0x1c(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10ba21: a1 d0 95 12 00 mov 0x1295d0,%eax
10ba26: 40 inc %eax
10ba27: a3 d0 95 12 00 mov %eax,0x1295d0
* 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 );
10ba2c: 83 ec 0c sub $0xc,%esp
10ba2f: 68 e0 99 12 00 push $0x1299e0
10ba34: e8 f7 20 00 00 call 10db30 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
10ba39: 83 c4 10 add $0x10,%esp
10ba3c: 85 c0 test %eax,%eax
10ba3e: 74 50 je 10ba90 <pthread_barrier_init+0xac>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
10ba40: 83 ec 08 sub $0x8,%esp
10ba43: 8d 55 e0 lea -0x20(%ebp),%edx
10ba46: 52 push %edx
10ba47: 8d 50 10 lea 0x10(%eax),%edx
10ba4a: 52 push %edx
10ba4b: 89 45 d4 mov %eax,-0x2c(%ebp)
10ba4e: e8 d9 16 00 00 call 10d12c <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10ba53: 8b 45 d4 mov -0x2c(%ebp),%eax
10ba56: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10ba59: 0f b7 f2 movzwl %dx,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10ba5c: 8b 0d fc 99 12 00 mov 0x1299fc,%ecx
10ba62: 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;
10ba65: 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;
10ba6c: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10ba6e: e8 f9 30 00 00 call 10eb6c <_Thread_Enable_dispatch>
return 0;
10ba73: 83 c4 10 add $0x10,%esp
10ba76: 31 c0 xor %eax,%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
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
10ba80: 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;
}
10ba85: 8d 65 f4 lea -0xc(%ebp),%esp
10ba88: 5b pop %ebx
10ba89: 5e pop %esi
10ba8a: 5f pop %edi
10ba8b: c9 leave
10ba8c: c3 ret
10ba8d: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
10ba90: e8 d7 30 00 00 call 10eb6c <_Thread_Enable_dispatch>
return EAGAIN;
10ba95: b8 0b 00 00 00 mov $0xb,%eax
10ba9a: eb e9 jmp 10ba85 <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 );
10ba9c: 83 ec 0c sub $0xc,%esp
10ba9f: 8d 7d d8 lea -0x28(%ebp),%edi
10baa2: 57 push %edi
10baa3: e8 7c fe ff ff call 10b924 <pthread_barrierattr_init>
10baa8: 83 c4 10 add $0x10,%esp
10baab: e9 5a ff ff ff jmp 10ba0a <pthread_barrier_init+0x26>
0010bab0 <pthread_barrier_wait>:
*/
int pthread_barrier_wait(
pthread_barrier_t *barrier
)
{
10bab0: 55 push %ebp
10bab1: 89 e5 mov %esp,%ebp
10bab3: 83 ec 18 sub $0x18,%esp
10bab6: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
10bab9: 85 c0 test %eax,%eax
10babb: 74 4f je 10bb0c <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(
10babd: 51 push %ecx
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
10babe: 8d 55 f4 lea -0xc(%ebp),%edx
10bac1: 52 push %edx
10bac2: ff 30 pushl (%eax)
10bac4: 68 e0 99 12 00 push $0x1299e0
10bac9: e8 16 25 00 00 call 10dfe4 <_Objects_Get>
switch ( location ) {
10bace: 83 c4 10 add $0x10,%esp
10bad1: 8b 55 f4 mov -0xc(%ebp),%edx
10bad4: 85 d2 test %edx,%edx
10bad6: 75 34 jne 10bb0c <pthread_barrier_wait+0x5c>
case OBJECTS_LOCAL:
_CORE_barrier_Wait(
10bad8: 83 ec 0c sub $0xc,%esp
10badb: 6a 00 push $0x0
10badd: 6a 00 push $0x0
10badf: 6a 01 push $0x1
10bae1: ff 70 08 pushl 0x8(%eax)
10bae4: 83 c0 10 add $0x10,%eax
10bae7: 50 push %eax
10bae8: e8 73 16 00 00 call 10d160 <_CORE_barrier_Wait>
the_barrier->Object.id,
true,
0,
NULL
);
_Thread_Enable_dispatch();
10baed: 83 c4 20 add $0x20,%esp
10baf0: e8 77 30 00 00 call 10eb6c <_Thread_Enable_dispatch>
return _POSIX_Barrier_Translate_core_barrier_return_code(
10baf5: 83 ec 0c sub $0xc,%esp
_Thread_Executing->Wait.return_code );
10baf8: a1 78 9b 12 00 mov 0x129b78,%eax
true,
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_Barrier_Translate_core_barrier_return_code(
10bafd: ff 70 34 pushl 0x34(%eax)
10bb00: e8 1f 5c 00 00 call 111724 <_POSIX_Barrier_Translate_core_barrier_return_code>
10bb05: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10bb08: c9 leave
10bb09: c3 ret
10bb0a: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10bb0c: b8 16 00 00 00 mov $0x16,%eax
}
10bb11: c9 leave
10bb12: c3 ret
0010b8dc <pthread_barrierattr_destroy>:
*/
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
10b8dc: 55 push %ebp
10b8dd: 89 e5 mov %esp,%ebp
10b8df: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10b8e2: 85 c0 test %eax,%eax
10b8e4: 74 12 je 10b8f8 <pthread_barrierattr_destroy+0x1c>
10b8e6: 8b 10 mov (%eax),%edx
10b8e8: 85 d2 test %edx,%edx
10b8ea: 74 0c je 10b8f8 <pthread_barrierattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10b8ec: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10b8f2: 31 c0 xor %eax,%eax
}
10b8f4: c9 leave
10b8f5: c3 ret
10b8f6: 66 90 xchg %ax,%ax
int pthread_barrierattr_destroy(
pthread_barrierattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
10b8f8: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10b8fd: c9 leave
10b8fe: c3 ret
0010b17c <pthread_cancel>:
*/
int pthread_cancel(
pthread_t thread
)
{
10b17c: 55 push %ebp
10b17d: 89 e5 mov %esp,%ebp
10b17f: 83 ec 18 sub $0x18,%esp
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
10b182: 8b 0d f4 96 12 00 mov 0x1296f4,%ecx
10b188: 85 c9 test %ecx,%ecx
10b18a: 74 08 je 10b194 <pthread_cancel+0x18>
return EPROTO;
10b18c: b8 47 00 00 00 mov $0x47,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b191: c9 leave
10b192: c3 ret
10b193: 90 nop
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
the_thread = _Thread_Get( thread, &location );
10b194: 83 ec 08 sub $0x8,%esp
10b197: 8d 45 f4 lea -0xc(%ebp),%eax
10b19a: 50 push %eax
10b19b: ff 75 08 pushl 0x8(%ebp)
10b19e: e8 d1 2c 00 00 call 10de74 <_Thread_Get>
switch ( location ) {
10b1a3: 83 c4 10 add $0x10,%esp
10b1a6: 8b 55 f4 mov -0xc(%ebp),%edx
10b1a9: 85 d2 test %edx,%edx
10b1ab: 75 23 jne 10b1d0 <pthread_cancel+0x54>
case OBJECTS_LOCAL:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
thread_support->cancelation_requested = 1;
10b1ad: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
10b1b3: c7 82 e0 00 00 00 01 movl $0x1,0xe0(%edx)
10b1ba: 00 00 00
/* This enables dispatch implicitly */
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread );
10b1bd: 83 ec 0c sub $0xc,%esp
10b1c0: 50 push %eax
10b1c1: e8 96 55 00 00 call 11075c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
return 0;
10b1c6: 83 c4 10 add $0x10,%esp
10b1c9: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b1cb: c9 leave
10b1cc: c3 ret
10b1cd: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10b1d0: b8 16 00 00 00 mov $0x16,%eax
}
10b1d5: c9 leave
10b1d6: c3 ret
0010affc <pthread_cleanup_pop>:
*/
void pthread_cleanup_pop(
int execute
)
{
10affc: 55 push %ebp
10affd: 89 e5 mov %esp,%ebp
10afff: 57 push %edi
10b000: 56 push %esi
10b001: 53 push %ebx
10b002: 83 ec 0c sub $0xc,%esp
10b005: 8b 75 08 mov 0x8(%ebp),%esi
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 ];
10b008: a1 18 88 12 00 mov 0x128818,%eax
10b00d: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b013: 8b 15 70 82 12 00 mov 0x128270,%edx
10b019: 42 inc %edx
10b01a: 89 15 70 82 12 00 mov %edx,0x128270
* 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 );
10b020: 9c pushf
10b021: fa cli
10b022: 5b pop %ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10b023: 8d 90 e8 00 00 00 lea 0xe8(%eax),%edx
if ( _Chain_Is_empty( handler_stack ) ) {
10b029: 39 90 e4 00 00 00 cmp %edx,0xe4(%eax)
10b02f: 74 47 je 10b078 <pthread_cleanup_pop+0x7c>
_Thread_Enable_dispatch();
_ISR_Enable( level );
return;
}
handler = (POSIX_Cancel_Handler_control *)
10b031: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
10b037: 8b 08 mov (%eax),%ecx
previous = the_node->previous;
10b039: 8b 50 04 mov 0x4(%eax),%edx
next->previous = previous;
10b03c: 89 51 04 mov %edx,0x4(%ecx)
previous->next = next;
10b03f: 89 0a mov %ecx,(%edx)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
10b041: 53 push %ebx
10b042: 9d popf
10b043: 8b 58 08 mov 0x8(%eax),%ebx
10b046: 8b 78 0c mov 0xc(%eax),%edi
tmp_handler = *handler;
_Workspace_Free( handler );
10b049: 83 ec 0c sub $0xc,%esp
10b04c: 50 push %eax
10b04d: e8 76 3a 00 00 call 10eac8 <_Workspace_Free>
_Thread_Enable_dispatch();
10b052: e8 79 2a 00 00 call 10dad0 <_Thread_Enable_dispatch>
if ( execute )
10b057: 83 c4 10 add $0x10,%esp
10b05a: 85 f6 test %esi,%esi
10b05c: 75 0a jne 10b068 <pthread_cleanup_pop+0x6c>
(*tmp_handler.routine)( tmp_handler.arg );
}
10b05e: 8d 65 f4 lea -0xc(%ebp),%esp
10b061: 5b pop %ebx
10b062: 5e pop %esi
10b063: 5f pop %edi
10b064: c9 leave
10b065: c3 ret
10b066: 66 90 xchg %ax,%ax
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
10b068: 89 7d 08 mov %edi,0x8(%ebp)
10b06b: 89 d8 mov %ebx,%eax
}
10b06d: 8d 65 f4 lea -0xc(%ebp),%esp
10b070: 5b pop %ebx
10b071: 5e pop %esi
10b072: 5f pop %edi
10b073: c9 leave
_Workspace_Free( handler );
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
10b074: ff e0 jmp *%eax
10b076: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
_Thread_Enable_dispatch();
10b078: e8 53 2a 00 00 call 10dad0 <_Thread_Enable_dispatch>
_ISR_Enable( level );
10b07d: 53 push %ebx
10b07e: 9d popf
_Thread_Enable_dispatch();
if ( execute )
(*tmp_handler.routine)( tmp_handler.arg );
}
10b07f: 8d 65 f4 lea -0xc(%ebp),%esp
10b082: 5b pop %ebx
10b083: 5e pop %esi
10b084: 5f pop %edi
10b085: c9 leave
10b086: c3 ret
0010b3a8 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
10b3a8: 55 push %ebp
10b3a9: 89 e5 mov %esp,%ebp
10b3ab: 56 push %esi
10b3ac: 53 push %ebx
10b3ad: 8b 5d 08 mov 0x8(%ebp),%ebx
10b3b0: 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 )
10b3b3: 85 db test %ebx,%ebx
10b3b5: 74 4d je 10b404 <pthread_cleanup_push+0x5c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b3b7: a1 f0 98 12 00 mov 0x1298f0,%eax
10b3bc: 40 inc %eax
10b3bd: a3 f0 98 12 00 mov %eax,0x1298f0
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
10b3c2: 83 ec 0c sub $0xc,%esp
10b3c5: 6a 10 push $0x10
10b3c7: e8 38 42 00 00 call 10f604 <_Workspace_Allocate>
if ( handler ) {
10b3cc: 83 c4 10 add $0x10,%esp
10b3cf: 85 c0 test %eax,%eax
10b3d1: 74 25 je 10b3f8 <pthread_cleanup_push+0x50><== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b3d3: 8b 15 98 9e 12 00 mov 0x129e98,%edx
handler_stack = &thread_support->Cancellation_Handlers;
10b3d9: 8b 92 ec 00 00 00 mov 0xec(%edx),%edx
10b3df: 81 c2 e4 00 00 00 add $0xe4,%edx
handler->routine = routine;
10b3e5: 89 58 08 mov %ebx,0x8(%eax)
handler->arg = arg;
10b3e8: 89 70 0c mov %esi,0xc(%eax)
_Chain_Append( handler_stack, &handler->Node );
10b3eb: 83 ec 08 sub $0x8,%esp
10b3ee: 50 push %eax
10b3ef: 52 push %edx
10b3f0: e8 bb 17 00 00 call 10cbb0 <_Chain_Append>
10b3f5: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
}
10b3f8: 8d 65 f8 lea -0x8(%ebp),%esp
10b3fb: 5b pop %ebx
10b3fc: 5e pop %esi
10b3fd: c9 leave
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
10b3fe: e9 95 31 00 00 jmp 10e598 <_Thread_Enable_dispatch>
10b403: 90 nop
}
10b404: 8d 65 f8 lea -0x8(%ebp),%esp
10b407: 5b pop %ebx
10b408: 5e pop %esi
10b409: c9 leave
10b40a: c3 ret
0010c0ac <pthread_cond_destroy>:
*/
int pthread_cond_destroy(
pthread_cond_t *cond
)
{
10c0ac: 55 push %ebp
10c0ad: 89 e5 mov %esp,%ebp
10c0af: 53 push %ebx
10c0b0: 83 ec 1c sub $0x1c,%esp
POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
the_cond = _POSIX_Condition_variables_Get( cond, &location );
10c0b3: 8d 45 f4 lea -0xc(%ebp),%eax
10c0b6: 50 push %eax
10c0b7: ff 75 08 pushl 0x8(%ebp)
10c0ba: e8 65 00 00 00 call 10c124 <_POSIX_Condition_variables_Get>
10c0bf: 89 c3 mov %eax,%ebx
switch ( location ) {
10c0c1: 83 c4 10 add $0x10,%esp
10c0c4: 8b 4d f4 mov -0xc(%ebp),%ecx
10c0c7: 85 c9 test %ecx,%ecx
10c0c9: 75 25 jne 10c0f0 <pthread_cond_destroy+0x44>
case OBJECTS_LOCAL:
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
10c0cb: 83 ec 0c sub $0xc,%esp
10c0ce: 8d 40 18 lea 0x18(%eax),%eax
10c0d1: 50 push %eax
10c0d2: e8 51 3e 00 00 call 10ff28 <_Thread_queue_First>
10c0d7: 83 c4 10 add $0x10,%esp
10c0da: 85 c0 test %eax,%eax
10c0dc: 74 1e je 10c0fc <pthread_cond_destroy+0x50>
_Thread_Enable_dispatch();
10c0de: e8 61 37 00 00 call 10f844 <_Thread_Enable_dispatch>
return EBUSY;
10c0e3: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c0e8: 8b 5d fc mov -0x4(%ebp),%ebx
10c0eb: c9 leave
10c0ec: c3 ret
10c0ed: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c0f0: b8 16 00 00 00 mov $0x16,%eax
}
10c0f5: 8b 5d fc mov -0x4(%ebp),%ebx
10c0f8: c9 leave
10c0f9: c3 ret
10c0fa: 66 90 xchg %ax,%ax
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
_Thread_Enable_dispatch();
return EBUSY;
}
_Objects_Close(
10c0fc: 83 ec 08 sub $0x8,%esp
10c0ff: 53 push %ebx
10c100: 68 60 aa 12 00 push $0x12aa60
10c105: e8 7a 27 00 00 call 10e884 <_Objects_Close>
RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
POSIX_Condition_variables_Control *the_condition_variable
)
{
_Objects_Free(
10c10a: 58 pop %eax
10c10b: 5a pop %edx
10c10c: 53 push %ebx
10c10d: 68 60 aa 12 00 push $0x12aa60
10c112: e8 65 2a 00 00 call 10eb7c <_Objects_Free>
&_POSIX_Condition_variables_Information,
&the_cond->Object
);
_POSIX_Condition_variables_Free( the_cond );
_Thread_Enable_dispatch();
10c117: e8 28 37 00 00 call 10f844 <_Thread_Enable_dispatch>
return 0;
10c11c: 83 c4 10 add $0x10,%esp
10c11f: 31 c0 xor %eax,%eax
10c121: eb d2 jmp 10c0f5 <pthread_cond_destroy+0x49>
0010c178 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
10c178: 55 push %ebp
10c179: 89 e5 mov %esp,%ebp
10c17b: 53 push %ebx
10c17c: 83 ec 14 sub $0x14,%esp
10c17f: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
10c182: 85 db test %ebx,%ebx
10c184: 0f 84 86 00 00 00 je 10c210 <pthread_cond_init+0x98>
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10c18a: 83 7b 04 01 cmpl $0x1,0x4(%ebx)
10c18e: 74 06 je 10c196 <pthread_cond_init+0x1e><== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
10c190: 8b 03 mov (%ebx),%eax
10c192: 85 c0 test %eax,%eax
10c194: 75 0a jne 10c1a0 <pthread_cond_init+0x28>
return EINVAL;
10c196: b8 16 00 00 00 mov $0x16,%eax
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10c19b: 8b 5d fc mov -0x4(%ebp),%ebx
10c19e: c9 leave
10c19f: c3 ret
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c1a0: a1 b0 a5 12 00 mov 0x12a5b0,%eax
10c1a5: 40 inc %eax
10c1a6: a3 b0 a5 12 00 mov %eax,0x12a5b0
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
_Objects_Allocate( &_POSIX_Condition_variables_Information );
10c1ab: 83 ec 0c sub $0xc,%esp
10c1ae: 68 60 aa 12 00 push $0x12aa60
10c1b3: e8 50 26 00 00 call 10e808 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
10c1b8: 83 c4 10 add $0x10,%esp
10c1bb: 85 c0 test %eax,%eax
10c1bd: 74 5d je 10c21c <pthread_cond_init+0xa4>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
10c1bf: 8b 53 04 mov 0x4(%ebx),%edx
10c1c2: 89 50 10 mov %edx,0x10(%eax)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
10c1c5: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax)
_Thread_queue_Initialize(
10c1cc: 6a 74 push $0x74
10c1ce: 68 00 08 00 10 push $0x10000800
10c1d3: 6a 00 push $0x0
10c1d5: 8d 50 18 lea 0x18(%eax),%edx
10c1d8: 52 push %edx
10c1d9: 89 45 f4 mov %eax,-0xc(%ebp)
10c1dc: e8 c3 3d 00 00 call 10ffa4 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c1e1: 8b 45 f4 mov -0xc(%ebp),%eax
10c1e4: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10c1e7: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c1ea: 8b 0d 7c aa 12 00 mov 0x12aa7c,%ecx
10c1f0: 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;
10c1f3: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
10c1fa: 8b 45 08 mov 0x8(%ebp),%eax
10c1fd: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10c1ff: e8 40 36 00 00 call 10f844 <_Thread_Enable_dispatch>
return 0;
10c204: 83 c4 10 add $0x10,%esp
10c207: 31 c0 xor %eax,%eax
}
10c209: 8b 5d fc mov -0x4(%ebp),%ebx
10c20c: c9 leave
10c20d: c3 ret
10c20e: 66 90 xchg %ax,%ax
{
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;
10c210: bb fc 3b 12 00 mov $0x123bfc,%ebx
10c215: e9 70 ff ff ff jmp 10c18a <pthread_cond_init+0x12>
10c21a: 66 90 xchg %ax,%ax
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
10c21c: e8 23 36 00 00 call 10f844 <_Thread_Enable_dispatch>
return ENOMEM;
10c221: b8 0c 00 00 00 mov $0xc,%eax
10c226: e9 70 ff ff ff jmp 10c19b <pthread_cond_init+0x23>
0010c008 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
10c008: 55 push %ebp
10c009: 89 e5 mov %esp,%ebp
10c00b: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10c00e: 85 c0 test %eax,%eax
10c010: 74 12 je 10c024 <pthread_condattr_destroy+0x1c>
10c012: 8b 10 mov (%eax),%edx
10c014: 85 d2 test %edx,%edx
10c016: 74 0c je 10c024 <pthread_condattr_destroy+0x1c><== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
10c018: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10c01e: 31 c0 xor %eax,%eax
}
10c020: c9 leave
10c021: c3 ret
10c022: 66 90 xchg %ax,%ax
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
10c024: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10c029: c9 leave
10c02a: c3 ret
0010c02c <pthread_condattr_getpshared>:
int pthread_condattr_getpshared(
const pthread_condattr_t *attr,
int *pshared
)
{
10c02c: 55 push %ebp
10c02d: 89 e5 mov %esp,%ebp
10c02f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr )
10c032: 85 c0 test %eax,%eax
10c034: 74 0e je 10c044 <pthread_condattr_getpshared+0x18>
return EINVAL;
*pshared = attr->process_shared;
10c036: 8b 50 04 mov 0x4(%eax),%edx
10c039: 8b 45 0c mov 0xc(%ebp),%eax
10c03c: 89 10 mov %edx,(%eax)
return 0;
10c03e: 31 c0 xor %eax,%eax
}
10c040: c9 leave
10c041: c3 ret
10c042: 66 90 xchg %ax,%ax
const pthread_condattr_t *attr,
int *pshared
)
{
if ( !attr )
return EINVAL;
10c044: b8 16 00 00 00 mov $0x16,%eax
*pshared = attr->process_shared;
return 0;
}
10c049: c9 leave
10c04a: c3 ret
0010c074 <pthread_condattr_setpshared>:
int pthread_condattr_setpshared(
pthread_condattr_t *attr,
int pshared
)
{
10c074: 55 push %ebp
10c075: 89 e5 mov %esp,%ebp
10c077: 8b 45 08 mov 0x8(%ebp),%eax
10c07a: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10c07d: 85 c0 test %eax,%eax
10c07f: 74 05 je 10c086 <pthread_condattr_setpshared+0x12>
return EINVAL;
switch ( pshared ) {
10c081: 83 fa 01 cmp $0x1,%edx
10c084: 76 0a jbe 10c090 <pthread_condattr_setpshared+0x1c>
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10c086: b8 16 00 00 00 mov $0x16,%eax
}
}
10c08b: c9 leave
10c08c: c3 ret
10c08d: 8d 76 00 lea 0x0(%esi),%esi
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10c090: 89 50 04 mov %edx,0x4(%eax)
return 0;
10c093: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10c095: c9 leave
10c096: c3 ret
0010b720 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
10b720: 55 push %ebp
10b721: 89 e5 mov %esp,%ebp
10b723: 57 push %edi
10b724: 56 push %esi
10b725: 53 push %ebx
10b726: 83 ec 5c sub $0x5c,%esp
10b729: 8b 5d 0c mov 0xc(%ebp),%ebx
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
10b72c: 8b 75 10 mov 0x10(%ebp),%esi
10b72f: 85 f6 test %esi,%esi
10b731: 0f 84 8d 01 00 00 je 10b8c4 <pthread_create+0x1a4>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10b737: 85 db test %ebx,%ebx
10b739: 74 65 je 10b7a0 <pthread_create+0x80>
if ( !the_attr->is_initialized )
10b73b: 8b 0b mov (%ebx),%ecx
10b73d: 85 c9 test %ecx,%ecx
10b73f: 74 1e je 10b75f <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) )
10b741: 8b 53 04 mov 0x4(%ebx),%edx
10b744: 85 d2 test %edx,%edx
10b746: 74 0a je 10b752 <pthread_create+0x32>
10b748: a1 38 4e 12 00 mov 0x124e38,%eax
10b74d: 39 43 08 cmp %eax,0x8(%ebx)
10b750: 72 0d jb 10b75f <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 ) {
10b752: 8b 43 10 mov 0x10(%ebx),%eax
10b755: 83 f8 01 cmp $0x1,%eax
10b758: 74 4e je 10b7a8 <pthread_create+0x88>
10b75a: 83 f8 02 cmp $0x2,%eax
10b75d: 74 11 je 10b770 <pthread_create+0x50>
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
10b75f: ba 16 00 00 00 mov $0x16,%edx
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
10b764: 89 d0 mov %edx,%eax
10b766: 8d 65 f4 lea -0xc(%ebp),%esp
10b769: 5b pop %ebx
10b76a: 5e pop %esi
10b76b: 5f pop %edi
10b76c: c9 leave
10b76d: c3 ret
10b76e: 66 90 xchg %ax,%ax
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
10b770: 8b 4b 14 mov 0x14(%ebx),%ecx
10b773: 89 4d b0 mov %ecx,-0x50(%ebp)
schedparam = the_attr->schedparam;
10b776: 8d 45 c4 lea -0x3c(%ebp),%eax
10b779: 89 45 b4 mov %eax,-0x4c(%ebp)
10b77c: 8d 73 18 lea 0x18(%ebx),%esi
10b77f: b9 07 00 00 00 mov $0x7,%ecx
10b784: 89 c7 mov %eax,%edi
10b786: 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 )
10b788: 8b 43 0c mov 0xc(%ebx),%eax
10b78b: 85 c0 test %eax,%eax
10b78d: 74 49 je 10b7d8 <pthread_create+0xb8> <== ALWAYS TAKEN
return ENOTSUP;
10b78f: ba 86 00 00 00 mov $0x86,%edx
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
10b794: 89 d0 mov %edx,%eax
10b796: 8d 65 f4 lea -0xc(%ebp),%esp
10b799: 5b pop %ebx
10b79a: 5e pop %esi
10b79b: 5f pop %edi
10b79c: c9 leave
10b79d: c3 ret
10b79e: 66 90 xchg %ax,%ax
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
10b7a0: bb a0 27 12 00 mov $0x1227a0,%ebx
10b7a5: eb 94 jmp 10b73b <pthread_create+0x1b>
10b7a7: 90 nop
* 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 ];
10b7a8: a1 d8 96 12 00 mov 0x1296d8,%eax
10b7ad: 8b b0 ec 00 00 00 mov 0xec(%eax),%esi
schedpolicy = api->schedpolicy;
10b7b3: 8b 8e 84 00 00 00 mov 0x84(%esi),%ecx
10b7b9: 89 4d b0 mov %ecx,-0x50(%ebp)
schedparam = api->schedparam;
10b7bc: 8d 45 c4 lea -0x3c(%ebp),%eax
10b7bf: 89 45 b4 mov %eax,-0x4c(%ebp)
10b7c2: 81 c6 88 00 00 00 add $0x88,%esi
10b7c8: b9 07 00 00 00 mov $0x7,%ecx
10b7cd: 89 c7 mov %eax,%edi
10b7cf: 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 )
10b7d1: 8b 43 0c mov 0xc(%ebx),%eax
10b7d4: 85 c0 test %eax,%eax
10b7d6: 75 b7 jne 10b78f <pthread_create+0x6f>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
10b7d8: 83 ec 0c sub $0xc,%esp
10b7db: ff 75 c4 pushl -0x3c(%ebp)
10b7de: e8 bd 62 00 00 call 111aa0 <_POSIX_Priority_Is_valid>
10b7e3: 83 c4 10 add $0x10,%esp
10b7e6: 84 c0 test %al,%al
10b7e8: 0f 84 71 ff ff ff je 10b75f <pthread_create+0x3f> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
10b7ee: 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);
10b7f1: 0f b6 35 3c 4e 12 00 movzbl 0x124e3c,%esi
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
10b7f8: 8d 45 e0 lea -0x20(%ebp),%eax
10b7fb: 50 push %eax
10b7fc: 8d 45 e4 lea -0x1c(%ebp),%eax
10b7ff: 50 push %eax
10b800: ff 75 b4 pushl -0x4c(%ebp)
10b803: ff 75 b0 pushl -0x50(%ebp)
10b806: e8 b1 62 00 00 call 111abc <_POSIX_Thread_Translate_sched_param>
10b80b: 89 c2 mov %eax,%edx
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
10b80d: 83 c4 10 add $0x10,%esp
10b810: 85 c0 test %eax,%eax
10b812: 0f 85 4c ff ff ff jne 10b764 <pthread_create+0x44>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10b818: 83 ec 0c sub $0xc,%esp
10b81b: ff 35 e0 91 12 00 pushl 0x1291e0
10b821: 89 45 a0 mov %eax,-0x60(%ebp)
10b824: e8 b3 17 00 00 call 10cfdc <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
10b829: c7 04 24 c0 93 12 00 movl $0x1293c0,(%esp)
10b830: e8 cb 21 00 00 call 10da00 <_Objects_Allocate>
10b835: 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 ) {
10b838: 83 c4 10 add $0x10,%esp
10b83b: 85 c0 test %eax,%eax
10b83d: 8b 55 a0 mov -0x60(%ebp),%edx
10b840: 0f 84 0f 01 00 00 je 10b955 <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(
10b846: 8b 4d e0 mov -0x20(%ebp),%ecx
10b849: 8b 45 e4 mov -0x1c(%ebp),%eax
10b84c: 89 45 a4 mov %eax,-0x5c(%ebp)
10b84f: 8b 43 08 mov 0x8(%ebx),%eax
10b852: 89 45 a8 mov %eax,-0x58(%ebp)
10b855: a1 38 4e 12 00 mov 0x124e38,%eax
10b85a: d1 e0 shl %eax
10b85c: 3b 45 a8 cmp -0x58(%ebp),%eax
10b85f: 73 03 jae 10b864 <pthread_create+0x144>
10b861: 8b 45 a8 mov -0x58(%ebp),%eax
10b864: 83 ec 04 sub $0x4,%esp
10b867: 6a 00 push $0x0
10b869: 6a 00 push $0x0
10b86b: 51 push %ecx
10b86c: ff 75 a4 pushl -0x5c(%ebp)
10b86f: 6a 01 push $0x1
10b871: 81 e6 ff 00 00 00 and $0xff,%esi
10b877: 29 fe sub %edi,%esi
10b879: 56 push %esi
10b87a: 6a 01 push $0x1
10b87c: 50 push %eax
10b87d: ff 73 04 pushl 0x4(%ebx)
10b880: ff 75 ac pushl -0x54(%ebp)
10b883: 68 c0 93 12 00 push $0x1293c0
10b888: 89 55 a0 mov %edx,-0x60(%ebp)
10b88b: e8 48 32 00 00 call 10ead8 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
10b890: 83 c4 30 add $0x30,%esp
10b893: 84 c0 test %al,%al
10b895: 8b 55 a0 mov -0x60(%ebp),%edx
10b898: 75 34 jne 10b8ce <pthread_create+0x1ae>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
10b89a: 83 ec 08 sub $0x8,%esp
10b89d: ff 75 ac pushl -0x54(%ebp)
10b8a0: 68 c0 93 12 00 push $0x1293c0
10b8a5: e8 ca 24 00 00 call 10dd74 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
10b8aa: 59 pop %ecx
10b8ab: ff 35 e0 91 12 00 pushl 0x1291e0
10b8b1: e8 6e 17 00 00 call 10d024 <_API_Mutex_Unlock>
return EAGAIN;
10b8b6: 83 c4 10 add $0x10,%esp
10b8b9: ba 0b 00 00 00 mov $0xb,%edx
10b8be: e9 a1 fe ff ff jmp 10b764 <pthread_create+0x44>
10b8c3: 90 nop
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
10b8c4: ba 0e 00 00 00 mov $0xe,%edx
10b8c9: e9 96 fe ff ff jmp 10b764 <pthread_create+0x44>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10b8ce: 8b 4d ac mov -0x54(%ebp),%ecx
10b8d1: 8b 89 ec 00 00 00 mov 0xec(%ecx),%ecx
10b8d7: 89 4d a8 mov %ecx,-0x58(%ebp)
api->Attributes = *the_attr;
10b8da: b9 10 00 00 00 mov $0x10,%ecx
10b8df: 8b 7d a8 mov -0x58(%ebp),%edi
10b8e2: 89 de mov %ebx,%esi
10b8e4: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
api->detachstate = the_attr->detachstate;
10b8e6: 8b 43 3c mov 0x3c(%ebx),%eax
10b8e9: 8b 4d a8 mov -0x58(%ebp),%ecx
10b8ec: 89 41 40 mov %eax,0x40(%ecx)
api->schedpolicy = schedpolicy;
10b8ef: 8b 45 b0 mov -0x50(%ebp),%eax
10b8f2: 89 81 84 00 00 00 mov %eax,0x84(%ecx)
api->schedparam = schedparam;
10b8f8: 89 cf mov %ecx,%edi
10b8fa: 81 c7 88 00 00 00 add $0x88,%edi
10b900: b9 07 00 00 00 mov $0x7,%ecx
10b905: 8b 75 b4 mov -0x4c(%ebp),%esi
10b908: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
10b90a: 83 ec 0c sub $0xc,%esp
10b90d: 6a 00 push $0x0
10b90f: ff 75 14 pushl 0x14(%ebp)
10b912: ff 75 10 pushl 0x10(%ebp)
10b915: 6a 01 push $0x1
10b917: ff 75 ac pushl -0x54(%ebp)
10b91a: 89 55 a0 mov %edx,-0x60(%ebp)
10b91d: e8 a6 3a 00 00 call 10f3c8 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
10b922: 83 c4 20 add $0x20,%esp
10b925: 83 7d b0 04 cmpl $0x4,-0x50(%ebp)
10b929: 8b 55 a0 mov -0x60(%ebp),%edx
10b92c: 74 42 je 10b970 <pthread_create+0x250>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
10b92e: 8b 45 ac mov -0x54(%ebp),%eax
10b931: 8b 48 08 mov 0x8(%eax),%ecx
10b934: 8b 45 08 mov 0x8(%ebp),%eax
10b937: 89 08 mov %ecx,(%eax)
_RTEMS_Unlock_allocator();
10b939: 83 ec 0c sub $0xc,%esp
10b93c: ff 35 e0 91 12 00 pushl 0x1291e0
10b942: 89 55 a0 mov %edx,-0x60(%ebp)
10b945: e8 da 16 00 00 call 10d024 <_API_Mutex_Unlock>
return 0;
10b94a: 83 c4 10 add $0x10,%esp
10b94d: 8b 55 a0 mov -0x60(%ebp),%edx
10b950: e9 0f fe ff ff jmp 10b764 <pthread_create+0x44>
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10b955: 83 ec 0c sub $0xc,%esp
10b958: ff 35 e0 91 12 00 pushl 0x1291e0
10b95e: e8 c1 16 00 00 call 10d024 <_API_Mutex_Unlock>
return EAGAIN;
10b963: 83 c4 10 add $0x10,%esp
10b966: ba 0b 00 00 00 mov $0xb,%edx
10b96b: e9 f4 fd ff ff jmp 10b764 <pthread_create+0x44>
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
10b970: 83 ec 0c sub $0xc,%esp
&api->Sporadic_timer,
_Timespec_To_ticks( &api->schedparam.sched_ss_repl_period )
10b973: 8b 45 a8 mov -0x58(%ebp),%eax
10b976: 05 90 00 00 00 add $0x90,%eax
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
10b97b: 50 push %eax
10b97c: e8 d7 3b 00 00 call 10f558 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b981: 8b 4d a8 mov -0x58(%ebp),%ecx
10b984: 89 81 b4 00 00 00 mov %eax,0xb4(%ecx)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b98a: 58 pop %eax
10b98b: 5a pop %edx
10b98c: 89 c8 mov %ecx,%eax
10b98e: 05 a8 00 00 00 add $0xa8,%eax
10b993: 50 push %eax
10b994: 68 00 92 12 00 push $0x129200
10b999: e8 ea 3e 00 00 call 10f888 <_Watchdog_Insert>
10b99e: 83 c4 10 add $0x10,%esp
10b9a1: 8b 55 a0 mov -0x60(%ebp),%edx
10b9a4: eb 88 jmp 10b92e <pthread_create+0x20e>
0010b834 <pthread_detach>:
#include <rtems/posix/pthread.h>
int pthread_detach(
pthread_t thread
)
{
10b834: 55 push %ebp
10b835: 89 e5 mov %esp,%ebp
10b837: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
POSIX_API_Control *api;
Objects_Locations location;
the_thread = _Thread_Get( thread, &location );
10b83a: 8d 45 f4 lea -0xc(%ebp),%eax
10b83d: 50 push %eax
10b83e: ff 75 08 pushl 0x8(%ebp)
10b841: e8 fe 2e 00 00 call 10e744 <_Thread_Get>
switch ( location ) {
10b846: 83 c4 10 add $0x10,%esp
10b849: 8b 55 f4 mov -0xc(%ebp),%edx
10b84c: 85 d2 test %edx,%edx
10b84e: 75 18 jne 10b868 <pthread_detach+0x34>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->detachstate = PTHREAD_CREATE_DETACHED;
10b850: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
10b856: c7 40 40 00 00 00 00 movl $0x0,0x40(%eax)
_Thread_Enable_dispatch();
10b85d: e8 be 2e 00 00 call 10e720 <_Thread_Enable_dispatch>
return 0;
10b862: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10b864: c9 leave
10b865: c3 ret
10b866: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10b868: b8 03 00 00 00 mov $0x3,%eax
}
10b86d: c9 leave
10b86e: c3 ret
00112e48 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
112e48: 55 push %ebp
112e49: 89 e5 mov %esp,%ebp
112e4b: 83 ec 10 sub $0x10,%esp
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
112e4e: ff 75 08 pushl 0x8(%ebp)
112e51: ff 35 f8 83 12 00 pushl 0x1283f8
112e57: e8 88 ff ff ff call 112de4 <_POSIX_Thread_Exit>
112e5c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
112e5f: c9 leave <== NOT EXECUTED
112e60: c3 ret <== NOT EXECUTED
0010d918 <pthread_getschedparam>:
int pthread_getschedparam(
pthread_t thread,
int *policy,
struct sched_param *param
)
{
10d918: 55 push %ebp
10d919: 89 e5 mov %esp,%ebp
10d91b: 57 push %edi
10d91c: 56 push %esi
10d91d: 53 push %ebx
10d91e: 83 ec 1c sub $0x1c,%esp
10d921: 8b 7d 0c mov 0xc(%ebp),%edi
10d924: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
10d927: 85 ff test %edi,%edi
10d929: 74 65 je 10d990 <pthread_getschedparam+0x78>
10d92b: 85 db test %ebx,%ebx
10d92d: 74 61 je 10d990 <pthread_getschedparam+0x78>
return EINVAL;
the_thread = _Thread_Get( thread, &location );
10d92f: 83 ec 08 sub $0x8,%esp
10d932: 8d 45 e4 lea -0x1c(%ebp),%eax
10d935: 50 push %eax
10d936: ff 75 08 pushl 0x8(%ebp)
10d939: e8 a6 2f 00 00 call 1108e4 <_Thread_Get>
switch ( location ) {
10d93e: 83 c4 10 add $0x10,%esp
10d941: 8b 55 e4 mov -0x1c(%ebp),%edx
10d944: 85 d2 test %edx,%edx
10d946: 75 38 jne 10d980 <pthread_getschedparam+0x68>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10d948: 8b b0 ec 00 00 00 mov 0xec(%eax),%esi
if ( policy )
*policy = api->schedpolicy;
10d94e: 8b 96 84 00 00 00 mov 0x84(%esi),%edx
10d954: 89 17 mov %edx,(%edi)
if ( param ) {
*param = api->schedparam;
10d956: 81 c6 88 00 00 00 add $0x88,%esi
10d95c: b9 07 00 00 00 mov $0x7,%ecx
10d961: 89 df mov %ebx,%edi
10d963: 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);
10d965: 0f b6 15 3c 8a 12 00 movzbl 0x128a3c,%edx
10d96c: 2b 50 14 sub 0x14(%eax),%edx
10d96f: 89 13 mov %edx,(%ebx)
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
10d971: e8 4a 2f 00 00 call 1108c0 <_Thread_Enable_dispatch>
return 0;
10d976: 31 c0 xor %eax,%eax
break;
}
return ESRCH;
}
10d978: 8d 65 f4 lea -0xc(%ebp),%esp
10d97b: 5b pop %ebx
10d97c: 5e pop %esi
10d97d: 5f pop %edi
10d97e: c9 leave
10d97f: c3 ret
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10d980: b8 03 00 00 00 mov $0x3,%eax
}
10d985: 8d 65 f4 lea -0xc(%ebp),%esp
10d988: 5b pop %ebx
10d989: 5e pop %esi
10d98a: 5f pop %edi
10d98b: c9 leave
10d98c: c3 ret
10d98d: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
return EINVAL;
10d990: b8 16 00 00 00 mov $0x16,%eax
break;
}
return ESRCH;
}
10d995: 8d 65 f4 lea -0xc(%ebp),%esp
10d998: 5b pop %ebx
10d999: 5e pop %esi
10d99a: 5f pop %edi
10d99b: c9 leave
10d99c: c3 ret
0010b700 <pthread_getspecific>:
*/
void *pthread_getspecific(
pthread_key_t key
)
{
10b700: 55 push %ebp
10b701: 89 e5 mov %esp,%ebp
10b703: 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 );
10b706: 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 );
10b709: 50 push %eax
10b70a: ff 75 08 pushl 0x8(%ebp)
10b70d: 68 c0 a1 12 00 push $0x12a1c0
10b712: e8 9d 25 00 00 call 10dcb4 <_Objects_Get>
switch ( location ) {
10b717: 83 c4 10 add $0x10,%esp
10b71a: 8b 55 f4 mov -0xc(%ebp),%edx
10b71d: 85 d2 test %edx,%edx
10b71f: 75 2b jne 10b74c <pthread_getspecific+0x4c>
case OBJECTS_LOCAL:
api = _Objects_Get_API( _Thread_Executing->Object.id );
10b721: 8b 15 f8 a2 12 00 mov 0x12a2f8,%edx
10b727: 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);
10b72a: 89 ca mov %ecx,%edx
10b72c: c1 ea 18 shr $0x18,%edx
10b72f: 83 e2 07 and $0x7,%edx
index = _Objects_Get_index( _Thread_Executing->Object.id );
10b732: 0f b7 c9 movzwl %cx,%ecx
key_data = (void *) the_key->Values[ api ][ index ];
10b735: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax
10b739: 8b 04 88 mov (%eax,%ecx,4),%eax
_Thread_Enable_dispatch();
10b73c: 89 45 e4 mov %eax,-0x1c(%ebp)
10b73f: e8 f8 30 00 00 call 10e83c <_Thread_Enable_dispatch>
return key_data;
10b744: 8b 45 e4 mov -0x1c(%ebp),%eax
case OBJECTS_ERROR:
break;
}
return NULL;
}
10b747: c9 leave
10b748: c3 ret
10b749: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return NULL;
10b74c: 31 c0 xor %eax,%eax
}
10b74e: c9 leave
10b74f: c3 ret
0011115c <pthread_join>:
int pthread_join(
pthread_t thread,
void **value_ptr
)
{
11115c: 55 push %ebp
11115d: 89 e5 mov %esp,%ebp
11115f: 53 push %ebx
111160: 83 ec 1c sub $0x1c,%esp
111163: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
POSIX_API_Control *api;
Objects_Locations location;
void *return_pointer;
the_thread = _Thread_Get( thread, &location );
111166: 8d 45 f4 lea -0xc(%ebp),%eax
111169: 50 push %eax
11116a: ff 75 08 pushl 0x8(%ebp)
11116d: e8 b2 2f 00 00 call 114124 <_Thread_Get>
switch ( location ) {
111172: 83 c4 10 add $0x10,%esp
111175: 8b 55 f4 mov -0xc(%ebp),%edx
111178: 85 d2 test %edx,%edx
11117a: 74 0c je 111188 <pthread_join+0x2c>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
11117c: b8 03 00 00 00 mov $0x3,%eax
}
111181: 8b 5d fc mov -0x4(%ebp),%ebx
111184: c9 leave
111185: c3 ret
111186: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( thread, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
111188: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
11118e: 8b 4a 40 mov 0x40(%edx),%ecx
111191: 85 c9 test %ecx,%ecx
111193: 74 43 je 1111d8 <pthread_join+0x7c>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
111195: 8b 0d d8 2d 13 00 mov 0x132dd8,%ecx
_Thread_Enable_dispatch();
return EINVAL;
}
if ( _Thread_Is_executing( the_thread ) ) {
11119b: 39 c8 cmp %ecx,%eax
11119d: 74 49 je 1111e8 <pthread_join+0x8c>
/*
* Put ourself on the threads join list
*/
_Thread_Executing->Wait.return_argument = &return_pointer;
11119f: 8d 45 f0 lea -0x10(%ebp),%eax
1111a2: 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;
1111a5: c7 42 74 01 00 00 00 movl $0x1,0x74(%edx)
_Thread_queue_Enter_critical_section( &api->Join_List );
_Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT );
1111ac: 50 push %eax
1111ad: 68 d4 48 11 00 push $0x1148d4
1111b2: 6a 00 push $0x0
1111b4: 83 c2 44 add $0x44,%edx
1111b7: 52 push %edx
1111b8: e8 eb 33 00 00 call 1145a8 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
1111bd: e8 3e 2f 00 00 call 114100 <_Thread_Enable_dispatch>
if ( value_ptr )
1111c2: 83 c4 10 add $0x10,%esp
1111c5: 85 db test %ebx,%ebx
1111c7: 74 2b je 1111f4 <pthread_join+0x98>
*value_ptr = return_pointer;
1111c9: 8b 45 f0 mov -0x10(%ebp),%eax
1111cc: 89 03 mov %eax,(%ebx)
return 0;
1111ce: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
1111d0: 8b 5d fc mov -0x4(%ebp),%ebx
1111d3: c9 leave
1111d4: c3 ret
1111d5: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->detachstate == PTHREAD_CREATE_DETACHED ) {
_Thread_Enable_dispatch();
1111d8: e8 23 2f 00 00 call 114100 <_Thread_Enable_dispatch>
return EINVAL;
1111dd: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
1111e2: 8b 5d fc mov -0x4(%ebp),%ebx
1111e5: c9 leave
1111e6: c3 ret
1111e7: 90 nop
_Thread_Enable_dispatch();
return EINVAL;
}
if ( _Thread_Is_executing( the_thread ) ) {
_Thread_Enable_dispatch();
1111e8: e8 13 2f 00 00 call 114100 <_Thread_Enable_dispatch>
return EDEADLK;
1111ed: b8 2d 00 00 00 mov $0x2d,%eax
1111f2: eb 8d jmp 111181 <pthread_join+0x25>
_Thread_Enable_dispatch();
if ( value_ptr )
*value_ptr = return_pointer;
return 0;
1111f4: 31 c0 xor %eax,%eax
1111f6: eb 89 jmp 111181 <pthread_join+0x25>
0010b58c <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
10b58c: 55 push %ebp
10b58d: 89 e5 mov %esp,%ebp
10b58f: 57 push %edi
10b590: 56 push %esi
10b591: 53 push %ebx
10b592: 83 ec 28 sub $0x28,%esp
10b595: a1 50 9d 12 00 mov 0x129d50,%eax
10b59a: 40 inc %eax
10b59b: a3 50 9d 12 00 mov %eax,0x129d50
* 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 );
10b5a0: 68 c0 a1 12 00 push $0x12a1c0
10b5a5: e8 56 22 00 00 call 10d800 <_Objects_Allocate>
10b5aa: 89 c6 mov %eax,%esi
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
10b5ac: 83 c4 10 add $0x10,%esp
10b5af: 85 c0 test %eax,%eax
10b5b1: 74 79 je 10b62c <pthread_key_create+0xa0>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
10b5b3: 8b 45 0c mov 0xc(%ebp),%eax
10b5b6: 89 46 10 mov %eax,0x10(%esi)
* This is a bit more complex than one might initially expect because
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) {
10b5b9: bb 01 00 00 00 mov $0x1,%ebx
the_key->Values[ the_api ] = NULL;
10b5be: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4)
10b5c5: 00
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
10b5c6: 8b 04 9d 28 9d 12 00 mov 0x129d28(,%ebx,4),%eax
10b5cd: 8b 40 04 mov 0x4(%eax),%eax
10b5d0: 0f b7 40 10 movzwl 0x10(%eax),%eax
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
10b5d4: 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 );
10b5db: 83 ec 0c sub $0xc,%esp
10b5de: 51 push %ecx
10b5df: 89 4d e4 mov %ecx,-0x1c(%ebp)
10b5e2: e8 39 43 00 00 call 10f920 <_Workspace_Allocate>
if ( !table ) {
10b5e7: 83 c4 10 add $0x10,%esp
10b5ea: 85 c0 test %eax,%eax
10b5ec: 8b 4d e4 mov -0x1c(%ebp),%ecx
10b5ef: 74 4f je 10b640 <pthread_key_create+0xb4>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
10b5f1: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4)
memset( table, '\0', bytes_to_allocate );
10b5f5: 89 c7 mov %eax,%edi
10b5f7: 31 c0 xor %eax,%eax
10b5f9: f3 aa rep stos %al,%es:(%edi)
* This is a bit more complex than one might initially expect because
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) {
10b5fb: 43 inc %ebx
10b5fc: 83 fb 04 cmp $0x4,%ebx
10b5ff: 75 bd jne 10b5be <pthread_key_create+0x32>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10b601: 8b 46 08 mov 0x8(%esi),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10b604: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b607: 8b 15 dc a1 12 00 mov 0x12a1dc,%edx
10b60d: 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;
10b610: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi)
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
10b617: 8b 55 08 mov 0x8(%ebp),%edx
10b61a: 89 02 mov %eax,(%edx)
_Thread_Enable_dispatch();
10b61c: e8 1b 32 00 00 call 10e83c <_Thread_Enable_dispatch>
return 0;
10b621: 31 c0 xor %eax,%eax
}
10b623: 8d 65 f4 lea -0xc(%ebp),%esp
10b626: 5b pop %ebx
10b627: 5e pop %esi
10b628: 5f pop %edi
10b629: c9 leave
10b62a: c3 ret
10b62b: 90 nop
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
10b62c: e8 0b 32 00 00 call 10e83c <_Thread_Enable_dispatch>
return EAGAIN;
10b631: b8 0b 00 00 00 mov $0xb,%eax
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10b636: 8d 65 f4 lea -0xc(%ebp),%esp
10b639: 5b pop %ebx
10b63a: 5e pop %esi
10b63b: 5f pop %edi
10b63c: c9 leave
10b63d: c3 ret
10b63e: 66 90 xchg %ax,%ax
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
_POSIX_Keys_Free_memory( the_key );
10b640: 83 ec 0c sub $0xc,%esp
10b643: 56 push %esi
10b644: e8 87 00 00 00 call 10b6d0 <_POSIX_Keys_Free_memory>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
10b649: 58 pop %eax
10b64a: 5a pop %edx
10b64b: 56 push %esi
10b64c: 68 c0 a1 12 00 push $0x12a1c0
10b651: e8 1e 25 00 00 call 10db74 <_Objects_Free>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
10b656: e8 e1 31 00 00 call 10e83c <_Thread_Enable_dispatch>
return ENOMEM;
10b65b: 83 c4 10 add $0x10,%esp
10b65e: b8 0c 00 00 00 mov $0xc,%eax
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10b663: 8d 65 f4 lea -0xc(%ebp),%esp
10b666: 5b pop %ebx
10b667: 5e pop %esi
10b668: 5f pop %edi
10b669: c9 leave
10b66a: c3 ret
0010b66c <pthread_key_delete>:
* 17.1.3 Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167
*/
int pthread_key_delete(
pthread_key_t key
)
{
10b66c: 55 push %ebp
10b66d: 89 e5 mov %esp,%ebp
10b66f: 53 push %ebx
10b670: 83 ec 18 sub $0x18,%esp
POSIX_Keys_Control *the_key;
Objects_Locations location;
the_key = _POSIX_Keys_Get( key, &location );
10b673: 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 );
10b676: 50 push %eax
10b677: ff 75 08 pushl 0x8(%ebp)
10b67a: 68 c0 a1 12 00 push $0x12a1c0
10b67f: e8 30 26 00 00 call 10dcb4 <_Objects_Get>
10b684: 89 c3 mov %eax,%ebx
switch ( location ) {
10b686: 83 c4 10 add $0x10,%esp
10b689: 8b 4d f4 mov -0xc(%ebp),%ecx
10b68c: 85 c9 test %ecx,%ecx
10b68e: 75 34 jne 10b6c4 <pthread_key_delete+0x58>
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
10b690: 83 ec 08 sub $0x8,%esp
10b693: 50 push %eax
10b694: 68 c0 a1 12 00 push $0x12a1c0
10b699: e8 de 21 00 00 call 10d87c <_Objects_Close>
_POSIX_Keys_Free_memory( the_key );
10b69e: 89 1c 24 mov %ebx,(%esp)
10b6a1: e8 2a 00 00 00 call 10b6d0 <_POSIX_Keys_Free_memory>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
10b6a6: 58 pop %eax
10b6a7: 5a pop %edx
10b6a8: 53 push %ebx
10b6a9: 68 c0 a1 12 00 push $0x12a1c0
10b6ae: e8 c1 24 00 00 call 10db74 <_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();
10b6b3: e8 84 31 00 00 call 10e83c <_Thread_Enable_dispatch>
return 0;
10b6b8: 83 c4 10 add $0x10,%esp
10b6bb: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10b6bd: 8b 5d fc mov -0x4(%ebp),%ebx
10b6c0: c9 leave
10b6c1: c3 ret
10b6c2: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10b6c4: b8 16 00 00 00 mov $0x16,%eax
}
10b6c9: 8b 5d fc mov -0x4(%ebp),%ebx
10b6cc: c9 leave
10b6cd: c3 ret
00124dfc <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
124dfc: 55 push %ebp
124dfd: 89 e5 mov %esp,%ebp
124dff: 57 push %edi
124e00: 56 push %esi
124e01: 53 push %ebx
124e02: 83 ec 1c sub $0x1c,%esp
124e05: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
124e08: 85 db test %ebx,%ebx
124e0a: 0f 84 80 00 00 00 je 124e90 <pthread_kill+0x94> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
124e10: 8d 7b ff lea -0x1(%ebx),%edi
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
124e13: 83 ff 1f cmp $0x1f,%edi
124e16: 77 78 ja 124e90 <pthread_kill+0x94>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
124e18: 83 ec 08 sub $0x8,%esp
124e1b: 8d 45 e4 lea -0x1c(%ebp),%eax
124e1e: 50 push %eax
124e1f: ff 75 08 pushl 0x8(%ebp)
124e22: e8 2d dd fe ff call 112b54 <_Thread_Get>
124e27: 89 c6 mov %eax,%esi
switch ( location ) {
124e29: 83 c4 10 add $0x10,%esp
124e2c: 8b 4d e4 mov -0x1c(%ebp),%ecx
124e2f: 85 c9 test %ecx,%ecx
124e31: 75 71 jne 124ea4 <pthread_kill+0xa8> <== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
124e33: 8b 90 ec 00 00 00 mov 0xec(%eax),%edx
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
124e39: 8d 04 5b lea (%ebx,%ebx,2),%eax
124e3c: 83 3c 85 e8 f1 12 00 cmpl $0x1,0x12f1e8(,%eax,4)
124e43: 01
124e44: 74 2d je 124e73 <pthread_kill+0x77> <== NEVER TAKEN
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
124e46: b8 01 00 00 00 mov $0x1,%eax
124e4b: 89 f9 mov %edi,%ecx
124e4d: d3 e0 shl %cl,%eax
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
124e4f: 09 82 d4 00 00 00 or %eax,0xd4(%edx)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
124e55: 52 push %edx
124e56: 6a 00 push $0x0
124e58: 53 push %ebx
124e59: 56 push %esi
124e5a: e8 7d fe ff ff call 124cdc <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
124e5f: 83 c4 10 add $0x10,%esp
124e62: a1 74 f1 12 00 mov 0x12f174,%eax
124e67: 85 c0 test %eax,%eax
124e69: 74 08 je 124e73 <pthread_kill+0x77>
124e6b: 3b 35 78 f1 12 00 cmp 0x12f178,%esi
124e71: 74 11 je 124e84 <pthread_kill+0x88>
_Thread_Dispatch_necessary = true;
}
_Thread_Enable_dispatch();
124e73: e8 b8 dc fe ff call 112b30 <_Thread_Enable_dispatch>
return 0;
124e78: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
124e7a: 8d 65 f4 lea -0xc(%ebp),%esp
124e7d: 5b pop %ebx
124e7e: 5e pop %esi
124e7f: 5f pop %edi
124e80: c9 leave
124e81: c3 ret
124e82: 66 90 xchg %ax,%ax
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 ) )
_Thread_Dispatch_necessary = true;
124e84: c6 05 84 f1 12 00 01 movb $0x1,0x12f184
124e8b: eb e6 jmp 124e73 <pthread_kill+0x77>
124e8d: 8d 76 00 lea 0x0(%esi),%esi
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
124e90: e8 17 36 ff ff call 1184ac <__errno>
124e95: c7 00 16 00 00 00 movl $0x16,(%eax)
124e9b: b8 ff ff ff ff mov $0xffffffff,%eax
124ea0: eb d8 jmp 124e7a <pthread_kill+0x7e>
124ea2: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
124ea4: e8 03 36 ff ff call 1184ac <__errno> <== NOT EXECUTED
124ea9: c7 00 03 00 00 00 movl $0x3,(%eax) <== NOT EXECUTED
124eaf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
124eb4: eb c4 jmp 124e7a <pthread_kill+0x7e> <== NOT EXECUTED
0010d1e4 <pthread_mutex_getprioceiling>:
int pthread_mutex_getprioceiling(
pthread_mutex_t *mutex,
int *prioceiling
)
{
10d1e4: 55 push %ebp
10d1e5: 89 e5 mov %esp,%ebp
10d1e7: 53 push %ebx
10d1e8: 83 ec 14 sub $0x14,%esp
10d1eb: 8b 5d 0c mov 0xc(%ebp),%ebx
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
if ( !prioceiling )
10d1ee: 85 db test %ebx,%ebx
10d1f0: 74 19 je 10d20b <pthread_mutex_getprioceiling+0x27>
return EINVAL;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
10d1f2: 83 ec 08 sub $0x8,%esp
10d1f5: 8d 45 f4 lea -0xc(%ebp),%eax
10d1f8: 50 push %eax
10d1f9: ff 75 08 pushl 0x8(%ebp)
10d1fc: e8 3b ff ff ff call 10d13c <_POSIX_Mutex_Get>
switch ( location ) {
10d201: 83 c4 10 add $0x10,%esp
10d204: 8b 55 f4 mov -0xc(%ebp),%edx
10d207: 85 d2 test %edx,%edx
10d209: 74 0d je 10d218 <pthread_mutex_getprioceiling+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10d20b: b8 16 00 00 00 mov $0x16,%eax
}
10d210: 8b 5d fc mov -0x4(%ebp),%ebx
10d213: c9 leave
10d214: c3 ret
10d215: 8d 76 00 lea 0x0(%esi),%esi
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
10d218: 0f b6 15 3c 8a 12 00 movzbl 0x128a3c,%edx
10d21f: 2b 50 60 sub 0x60(%eax),%edx
10d222: 89 13 mov %edx,(%ebx)
case OBJECTS_LOCAL:
*prioceiling = _POSIX_Priority_From_core(
the_mutex->Mutex.Attributes.priority_ceiling
);
_Thread_Enable_dispatch();
10d224: e8 97 36 00 00 call 1108c0 <_Thread_Enable_dispatch>
return 0;
10d229: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10d22b: 8b 5d fc mov -0x4(%ebp),%ebx
10d22e: c9 leave
10d22f: c3 ret
0010d230 <pthread_mutex_init>:
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
10d230: 55 push %ebp
10d231: 89 e5 mov %esp,%ebp
10d233: 57 push %edi
10d234: 56 push %esi
10d235: 53 push %ebx
10d236: 83 ec 1c sub $0x1c,%esp
10d239: 8b 75 08 mov 0x8(%ebp),%esi
10d23c: 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;
10d23f: 85 db test %ebx,%ebx
10d241: 0f 84 09 01 00 00 je 10d350 <pthread_mutex_init+0x120>
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
10d247: 85 f6 test %esi,%esi
10d249: 0f 84 e5 00 00 00 je 10d334 <pthread_mutex_init+0x104>
}
}
}
#endif
if ( !the_attr->is_initialized )
10d24f: 8b 13 mov (%ebx),%edx
10d251: 85 d2 test %edx,%edx
10d253: 0f 84 db 00 00 00 je 10d334 <pthread_mutex_init+0x104>
return EINVAL;
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
10d259: 8b 43 04 mov 0x4(%ebx),%eax
10d25c: 83 f8 01 cmp $0x1,%eax
10d25f: 0f 84 f7 00 00 00 je 10d35c <pthread_mutex_init+0x12c>
return ENOSYS;
if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE )
10d265: 85 c0 test %eax,%eax
10d267: 0f 85 c7 00 00 00 jne 10d334 <pthread_mutex_init+0x104>
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
10d26d: 8b 43 0c mov 0xc(%ebx),%eax
10d270: 83 f8 01 cmp $0x1,%eax
10d273: 0f 84 eb 00 00 00 je 10d364 <pthread_mutex_init+0x134>
10d279: 83 f8 02 cmp $0x2,%eax
10d27c: 0f 84 c2 00 00 00 je 10d344 <pthread_mutex_init+0x114>
10d282: 85 c0 test %eax,%eax
10d284: 0f 85 aa 00 00 00 jne 10d334 <pthread_mutex_init+0x104>
case PTHREAD_PRIO_NONE:
the_discipline = CORE_MUTEX_DISCIPLINES_FIFO;
10d28a: 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 ) )
10d291: 83 ec 0c sub $0xc,%esp
10d294: ff 73 08 pushl 0x8(%ebx)
10d297: e8 58 03 00 00 call 10d5f4 <_POSIX_Priority_Is_valid>
10d29c: 83 c4 10 add $0x10,%esp
10d29f: 84 c0 test %al,%al
10d2a1: 0f 84 8d 00 00 00 je 10d334 <pthread_mutex_init+0x104>
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
/*
* Validate the mutex type and set appropriate SuperCore mutex
* attributes.
*/
switch ( the_attr->type ) {
10d2a7: 83 7b 10 03 cmpl $0x3,0x10(%ebx)
10d2ab: 0f 87 83 00 00 00 ja 10d334 <pthread_mutex_init+0x104>
10d2b1: a1 90 cd 12 00 mov 0x12cd90,%eax
10d2b6: 40 inc %eax
10d2b7: a3 90 cd 12 00 mov %eax,0x12cd90
* _POSIX_Mutex_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
{
return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
10d2bc: 83 ec 0c sub $0xc,%esp
10d2bf: 68 60 d1 12 00 push $0x12d160
10d2c4: e8 bb 25 00 00 call 10f884 <_Objects_Allocate>
10d2c9: 89 c7 mov %eax,%edi
*/
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
10d2cb: 83 c4 10 add $0x10,%esp
10d2ce: 85 c0 test %eax,%eax
10d2d0: 0f 84 9a 00 00 00 je 10d370 <pthread_mutex_init+0x140>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
10d2d6: 8b 43 04 mov 0x4(%ebx),%eax
10d2d9: 89 47 10 mov %eax,0x10(%edi)
the_mutex_attr = &the_mutex->Mutex.Attributes;
10d2dc: 8d 57 54 lea 0x54(%edi),%edx
if ( the_attr->recursive )
the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10d2df: 31 c0 xor %eax,%eax
10d2e1: 83 7b 14 00 cmpl $0x0,0x14(%ebx)
10d2e5: 0f 94 c0 sete %al
10d2e8: 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;
10d2eb: 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);
10d2ef: 0f b6 05 3c 8a 12 00 movzbl 0x128a3c,%eax
10d2f6: 2b 43 08 sub 0x8(%ebx),%eax
10d2f9: 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;
10d2fc: 8b 45 e4 mov -0x1c(%ebp),%eax
10d2ff: 89 47 5c mov %eax,0x5c(%edi)
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
10d302: 50 push %eax
10d303: 6a 01 push $0x1
10d305: 52 push %edx
10d306: 8d 47 14 lea 0x14(%edi),%eax
10d309: 50 push %eax
10d30a: e8 01 1d 00 00 call 10f010 <_CORE_mutex_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10d30f: 8b 47 08 mov 0x8(%edi),%eax
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10d312: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10d315: 8b 15 7c d1 12 00 mov 0x12d17c,%edx
10d31b: 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;
10d31e: 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;
10d325: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10d327: e8 94 35 00 00 call 1108c0 <_Thread_Enable_dispatch>
return 0;
10d32c: 83 c4 10 add $0x10,%esp
10d32f: 31 c0 xor %eax,%eax
10d331: eb 06 jmp 10d339 <pthread_mutex_init+0x109>
10d333: 90 nop
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
break;
default:
return EINVAL;
10d334: b8 16 00 00 00 mov $0x16,%eax
*mutex = the_mutex->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10d339: 8d 65 f4 lea -0xc(%ebp),%esp
10d33c: 5b pop %ebx
10d33d: 5e pop %esi
10d33e: 5f pop %edi
10d33f: c9 leave
10d340: c3 ret
10d341: 8d 76 00 lea 0x0(%esi),%esi
break;
case PTHREAD_PRIO_INHERIT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
break;
case PTHREAD_PRIO_PROTECT:
the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
10d344: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp)
break;
10d34b: e9 41 ff ff ff jmp 10d291 <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;
10d350: bb e0 d1 12 00 mov $0x12d1e0,%ebx
10d355: e9 ed fe ff ff jmp 10d247 <pthread_mutex_init+0x17>
10d35a: 66 90 xchg %ax,%ax
/*
* We only support process private mutexes.
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return ENOSYS;
10d35c: b8 58 00 00 00 mov $0x58,%eax
10d361: eb d6 jmp 10d339 <pthread_mutex_init+0x109>
10d363: 90 nop
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;
10d364: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp)
10d36b: e9 21 ff ff ff jmp 10d291 <pthread_mutex_init+0x61>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
_Thread_Enable_dispatch();
10d370: e8 4b 35 00 00 call 1108c0 <_Thread_Enable_dispatch>
return EAGAIN;
10d375: b8 0b 00 00 00 mov $0xb,%eax
10d37a: eb bd jmp 10d339 <pthread_mutex_init+0x109>
0010d488 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
10d488: 55 push %ebp
10d489: 89 e5 mov %esp,%ebp
10d48b: 56 push %esi
10d48c: 53 push %ebx
10d48d: 83 ec 18 sub $0x18,%esp
10d490: 8b 75 08 mov 0x8(%ebp),%esi
*
* 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 );
10d493: 8d 45 f4 lea -0xc(%ebp),%eax
10d496: 50 push %eax
10d497: ff 75 0c pushl 0xc(%ebp)
10d49a: e8 cd 00 00 00 call 10d56c <_POSIX_Absolute_timeout_to_ticks>
10d49f: 89 c3 mov %eax,%ebx
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10d4a1: 83 c4 10 add $0x10,%esp
10d4a4: 83 f8 03 cmp $0x3,%eax
10d4a7: 74 2f je 10d4d8 <pthread_mutex_timedlock+0x50>
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
10d4a9: 50 push %eax
10d4aa: ff 75 f4 pushl -0xc(%ebp)
10d4ad: 6a 00 push $0x0
10d4af: 56 push %esi
10d4b0: e8 db fe ff ff call 10d390 <_POSIX_Mutex_Lock_support>
* This service only gives us the option to block. We used a polling
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
10d4b5: 83 c4 10 add $0x10,%esp
10d4b8: 83 f8 10 cmp $0x10,%eax
10d4bb: 74 07 je 10d4c4 <pthread_mutex_timedlock+0x3c><== ALWAYS TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
10d4bd: 8d 65 f8 lea -0x8(%ebp),%esp
10d4c0: 5b pop %ebx
10d4c1: 5e pop %esi
10d4c2: c9 leave
10d4c3: c3 ret
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10d4c4: 85 db test %ebx,%ebx
10d4c6: 74 28 je 10d4f0 <pthread_mutex_timedlock+0x68><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10d4c8: 4b dec %ebx
10d4c9: 83 fb 01 cmp $0x1,%ebx
10d4cc: 77 ef ja 10d4bd <pthread_mutex_timedlock+0x35><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10d4ce: b8 74 00 00 00 mov $0x74,%eax
10d4d3: eb e8 jmp 10d4bd <pthread_mutex_timedlock+0x35>
10d4d5: 8d 76 00 lea 0x0(%esi),%esi
*/
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 );
10d4d8: 52 push %edx
10d4d9: ff 75 f4 pushl -0xc(%ebp)
10d4dc: 6a 01 push $0x1
10d4de: 56 push %esi
10d4df: e8 ac fe ff ff call 10d390 <_POSIX_Mutex_Lock_support>
10d4e4: 83 c4 10 add $0x10,%esp
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
10d4e7: 8d 65 f8 lea -0x8(%ebp),%esp
10d4ea: 5b pop %ebx
10d4eb: 5e pop %esi
10d4ec: c9 leave
10d4ed: c3 ret
10d4ee: 66 90 xchg %ax,%ax
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
10d4f0: b8 16 00 00 00 mov $0x16,%eax <== NOT EXECUTED
10d4f5: eb c6 jmp 10d4bd <pthread_mutex_timedlock+0x35><== NOT EXECUTED
0010cf6c <pthread_mutexattr_destroy>:
*/
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
10cf6c: 55 push %ebp
10cf6d: 89 e5 mov %esp,%ebp
10cf6f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || !attr->is_initialized )
10cf72: 85 c0 test %eax,%eax
10cf74: 74 12 je 10cf88 <pthread_mutexattr_destroy+0x1c>
10cf76: 8b 10 mov (%eax),%edx
10cf78: 85 d2 test %edx,%edx
10cf7a: 74 0c je 10cf88 <pthread_mutexattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10cf7c: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10cf82: 31 c0 xor %eax,%eax
}
10cf84: c9 leave
10cf85: c3 ret
10cf86: 66 90 xchg %ax,%ax
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
10cf88: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10cf8d: c9 leave
10cf8e: c3 ret
0010cfe0 <pthread_mutexattr_getpshared>:
int pthread_mutexattr_getpshared(
const pthread_mutexattr_t *attr,
int *pshared
)
{
10cfe0: 55 push %ebp
10cfe1: 89 e5 mov %esp,%ebp
10cfe3: 8b 45 08 mov 0x8(%ebp),%eax
10cfe6: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized || !pshared )
10cfe9: 85 c0 test %eax,%eax
10cfeb: 74 13 je 10d000 <pthread_mutexattr_getpshared+0x20><== NEVER TAKEN
10cfed: 8b 08 mov (%eax),%ecx
10cfef: 85 c9 test %ecx,%ecx
10cff1: 74 0d je 10d000 <pthread_mutexattr_getpshared+0x20><== NEVER TAKEN
10cff3: 85 d2 test %edx,%edx
10cff5: 74 09 je 10d000 <pthread_mutexattr_getpshared+0x20><== NEVER TAKEN
return EINVAL;
*pshared = attr->process_shared;
10cff7: 8b 40 04 mov 0x4(%eax),%eax
10cffa: 89 02 mov %eax,(%edx)
return 0;
10cffc: 31 c0 xor %eax,%eax
}
10cffe: c9 leave
10cfff: c3 ret
const pthread_mutexattr_t *attr,
int *pshared
)
{
if ( !attr || !attr->is_initialized || !pshared )
return EINVAL;
10d000: b8 16 00 00 00 mov $0x16,%eax
*pshared = attr->process_shared;
return 0;
}
10d005: c9 leave
10d006: c3 ret
0010d034 <pthread_mutexattr_setprioceiling>:
int pthread_mutexattr_setprioceiling(
pthread_mutexattr_t *attr,
int prioceiling
)
{
10d034: 55 push %ebp
10d035: 89 e5 mov %esp,%ebp
10d037: 56 push %esi
10d038: 53 push %ebx
10d039: 8b 5d 08 mov 0x8(%ebp),%ebx
10d03c: 8b 75 0c mov 0xc(%ebp),%esi
if ( !attr || !attr->is_initialized )
10d03f: 85 db test %ebx,%ebx
10d041: 74 06 je 10d049 <pthread_mutexattr_setprioceiling+0x15>
10d043: 8b 03 mov (%ebx),%eax
10d045: 85 c0 test %eax,%eax
10d047: 75 0f jne 10d058 <pthread_mutexattr_setprioceiling+0x24>
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
return EINVAL;
10d049: b8 16 00 00 00 mov $0x16,%eax
attr->prio_ceiling = prioceiling;
return 0;
}
10d04e: 8d 65 f8 lea -0x8(%ebp),%esp
10d051: 5b pop %ebx
10d052: 5e pop %esi
10d053: c9 leave
10d054: c3 ret
10d055: 8d 76 00 lea 0x0(%esi),%esi
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
10d058: 83 ec 0c sub $0xc,%esp
10d05b: 56 push %esi
10d05c: e8 93 05 00 00 call 10d5f4 <_POSIX_Priority_Is_valid>
10d061: 83 c4 10 add $0x10,%esp
10d064: 84 c0 test %al,%al
10d066: 74 e1 je 10d049 <pthread_mutexattr_setprioceiling+0x15>
return EINVAL;
attr->prio_ceiling = prioceiling;
10d068: 89 73 08 mov %esi,0x8(%ebx)
return 0;
10d06b: 31 c0 xor %eax,%eax
}
10d06d: 8d 65 f8 lea -0x8(%ebp),%esp
10d070: 5b pop %ebx
10d071: 5e pop %esi
10d072: c9 leave
10d073: c3 ret
0010d09c <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
10d09c: 55 push %ebp
10d09d: 89 e5 mov %esp,%ebp
10d09f: 8b 45 08 mov 0x8(%ebp),%eax
10d0a2: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10d0a5: 85 c0 test %eax,%eax
10d0a7: 74 0b je 10d0b4 <pthread_mutexattr_setpshared+0x18>
10d0a9: 8b 08 mov (%eax),%ecx
10d0ab: 85 c9 test %ecx,%ecx
10d0ad: 74 05 je 10d0b4 <pthread_mutexattr_setpshared+0x18>
return EINVAL;
switch ( pshared ) {
10d0af: 83 fa 01 cmp $0x1,%edx
10d0b2: 76 08 jbe 10d0bc <pthread_mutexattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10d0b4: b8 16 00 00 00 mov $0x16,%eax
}
}
10d0b9: c9 leave
10d0ba: c3 ret
10d0bb: 90 nop
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10d0bc: 89 50 04 mov %edx,0x4(%eax)
return 0;
10d0bf: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10d0c1: c9 leave
10d0c2: c3 ret
0010b290 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
10b290: 55 push %ebp
10b291: 89 e5 mov %esp,%ebp
10b293: 8b 45 08 mov 0x8(%ebp),%eax
10b296: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr || !attr->is_initialized )
10b299: 85 c0 test %eax,%eax
10b29b: 74 0b je 10b2a8 <pthread_mutexattr_settype+0x18>
10b29d: 8b 08 mov (%eax),%ecx
10b29f: 85 c9 test %ecx,%ecx
10b2a1: 74 05 je 10b2a8 <pthread_mutexattr_settype+0x18><== NEVER TAKEN
return EINVAL;
switch ( type ) {
10b2a3: 83 fa 03 cmp $0x3,%edx
10b2a6: 76 08 jbe 10b2b0 <pthread_mutexattr_settype+0x20>
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
return 0;
default:
return EINVAL;
10b2a8: b8 16 00 00 00 mov $0x16,%eax
}
}
10b2ad: c9 leave
10b2ae: c3 ret
10b2af: 90 nop
switch ( type ) {
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
10b2b0: 89 50 10 mov %edx,0x10(%eax)
return 0;
10b2b3: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10b2b5: c9 leave
10b2b6: c3 ret
0010bde4 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
10bde4: 55 push %ebp
10bde5: 89 e5 mov %esp,%ebp
10bde7: 57 push %edi
10bde8: 56 push %esi
10bde9: 53 push %ebx
10bdea: 83 ec 1c sub $0x1c,%esp
10bded: 8b 5d 08 mov 0x8(%ebp),%ebx
10bdf0: 8b 75 0c mov 0xc(%ebp),%esi
if ( !once_control || !init_routine )
10bdf3: 85 db test %ebx,%ebx
10bdf5: 74 51 je 10be48 <pthread_once+0x64>
10bdf7: 85 f6 test %esi,%esi
10bdf9: 74 4d je 10be48 <pthread_once+0x64>
return EINVAL;
if ( !once_control->init_executed ) {
10bdfb: 8b 7b 04 mov 0x4(%ebx),%edi
10bdfe: 85 ff test %edi,%edi
10be00: 74 0a je 10be0c <pthread_once+0x28>
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
10be02: 31 c0 xor %eax,%eax
}
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 ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
10be0c: 51 push %ecx
10be0d: 8d 7d e4 lea -0x1c(%ebp),%edi
10be10: 57 push %edi
10be11: 68 00 01 00 00 push $0x100
10be16: 68 00 01 00 00 push $0x100
10be1b: e8 ec 0b 00 00 call 10ca0c <rtems_task_mode>
if ( !once_control->init_executed ) {
10be20: 83 c4 10 add $0x10,%esp
10be23: 8b 53 04 mov 0x4(%ebx),%edx
10be26: 85 d2 test %edx,%edx
10be28: 74 2e je 10be58 <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);
10be2a: 50 push %eax
10be2b: 57 push %edi
10be2c: 68 00 01 00 00 push $0x100
10be31: ff 75 e4 pushl -0x1c(%ebp)
10be34: e8 d3 0b 00 00 call 10ca0c <rtems_task_mode>
10be39: 83 c4 10 add $0x10,%esp
}
return 0;
10be3c: 31 c0 xor %eax,%eax
}
10be3e: 8d 65 f4 lea -0xc(%ebp),%esp
10be41: 5b pop %ebx
10be42: 5e pop %esi
10be43: 5f pop %edi
10be44: c9 leave
10be45: c3 ret
10be46: 66 90 xchg %ax,%ax
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
10be48: b8 16 00 00 00 mov $0x16,%eax
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
10be4d: 8d 65 f4 lea -0xc(%ebp),%esp
10be50: 5b pop %ebx
10be51: 5e pop %esi
10be52: 5f pop %edi
10be53: c9 leave
10be54: c3 ret
10be55: 8d 76 00 lea 0x0(%esi),%esi
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;
10be58: c7 03 01 00 00 00 movl $0x1,(%ebx)
once_control->init_executed = true;
10be5e: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx)
(*init_routine)();
10be65: ff d6 call *%esi
10be67: eb c1 jmp 10be2a <pthread_once+0x46>
0010c4c8 <pthread_rwlock_destroy>:
*/
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
{
10c4c8: 55 push %ebp
10c4c9: 89 e5 mov %esp,%ebp
10c4cb: 53 push %ebx
10c4cc: 83 ec 14 sub $0x14,%esp
10c4cf: 8b 45 08 mov 0x8(%ebp),%eax
POSIX_RWLock_Control *the_rwlock = NULL;
Objects_Locations location;
if ( !rwlock )
10c4d2: 85 c0 test %eax,%eax
10c4d4: 74 42 je 10c518 <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(
10c4d6: 53 push %ebx
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c4d7: 8d 55 f4 lea -0xc(%ebp),%edx
10c4da: 52 push %edx
10c4db: ff 30 pushl (%eax)
10c4dd: 68 20 ba 12 00 push $0x12ba20
10c4e2: e8 d9 2b 00 00 call 10f0c0 <_Objects_Get>
10c4e7: 89 c3 mov %eax,%ebx
switch ( location ) {
10c4e9: 83 c4 10 add $0x10,%esp
10c4ec: 8b 4d f4 mov -0xc(%ebp),%ecx
10c4ef: 85 c9 test %ecx,%ecx
10c4f1: 75 25 jne 10c518 <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 ) {
10c4f3: 83 ec 0c sub $0xc,%esp
10c4f6: 8d 40 10 lea 0x10(%eax),%eax
10c4f9: 50 push %eax
10c4fa: e8 19 3f 00 00 call 110418 <_Thread_queue_First>
10c4ff: 83 c4 10 add $0x10,%esp
10c502: 85 c0 test %eax,%eax
10c504: 74 1e je 10c524 <pthread_rwlock_destroy+0x5c>
_Thread_Enable_dispatch();
10c506: e8 3d 37 00 00 call 10fc48 <_Thread_Enable_dispatch>
return EBUSY;
10c50b: b8 10 00 00 00 mov $0x10,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c510: 8b 5d fc mov -0x4(%ebp),%ebx
10c513: c9 leave
10c514: c3 ret
10c515: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
10c518: b8 16 00 00 00 mov $0x16,%eax
}
10c51d: 8b 5d fc mov -0x4(%ebp),%ebx
10c520: c9 leave
10c521: c3 ret
10c522: 66 90 xchg %ax,%ax
/*
* POSIX doesn't require behavior when it is locked.
*/
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
10c524: 83 ec 08 sub $0x8,%esp
10c527: 53 push %ebx
10c528: 68 20 ba 12 00 push $0x12ba20
10c52d: e8 56 27 00 00 call 10ec88 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free (
POSIX_RWLock_Control *the_RWLock
)
{
_Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object );
10c532: 58 pop %eax
10c533: 5a pop %edx
10c534: 53 push %ebx
10c535: 68 20 ba 12 00 push $0x12ba20
10c53a: e8 41 2a 00 00 call 10ef80 <_Objects_Free>
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
10c53f: e8 04 37 00 00 call 10fc48 <_Thread_Enable_dispatch>
return 0;
10c544: 83 c4 10 add $0x10,%esp
10c547: 31 c0 xor %eax,%eax
10c549: eb d2 jmp 10c51d <pthread_rwlock_destroy+0x55>
0010c54c <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
10c54c: 55 push %ebp
10c54d: 89 e5 mov %esp,%ebp
10c54f: 56 push %esi
10c550: 53 push %ebx
10c551: 83 ec 20 sub $0x20,%esp
10c554: 8b 5d 08 mov 0x8(%ebp),%ebx
10c557: 8b 75 0c mov 0xc(%ebp),%esi
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
10c55a: 85 db test %ebx,%ebx
10c55c: 74 15 je 10c573 <pthread_rwlock_init+0x27>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
10c55e: 85 f6 test %esi,%esi
10c560: 0f 84 8e 00 00 00 je 10c5f4 <pthread_rwlock_init+0xa8>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
10c566: 8b 16 mov (%esi),%edx
10c568: 85 d2 test %edx,%edx
10c56a: 74 07 je 10c573 <pthread_rwlock_init+0x27><== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
10c56c: 8b 46 04 mov 0x4(%esi),%eax
10c56f: 85 c0 test %eax,%eax
10c571: 74 0d je 10c580 <pthread_rwlock_init+0x34><== ALWAYS TAKEN
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
10c573: b8 16 00 00 00 mov $0x16,%eax
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
10c578: 8d 65 f8 lea -0x8(%ebp),%esp
10c57b: 5b pop %ebx
10c57c: 5e pop %esi
10c57d: c9 leave
10c57e: c3 ret
10c57f: 90 nop
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
10c580: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c587: a1 d0 b7 12 00 mov 0x12b7d0,%eax
10c58c: 40 inc %eax
10c58d: a3 d0 b7 12 00 mov %eax,0x12b7d0
* 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 );
10c592: 83 ec 0c sub $0xc,%esp
10c595: 68 20 ba 12 00 push $0x12ba20
10c59a: e8 6d 26 00 00 call 10ec0c <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
10c59f: 83 c4 10 add $0x10,%esp
10c5a2: 85 c0 test %eax,%eax
10c5a4: 74 42 je 10c5e8 <pthread_rwlock_init+0x9c>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
10c5a6: 83 ec 08 sub $0x8,%esp
10c5a9: 8d 55 f4 lea -0xc(%ebp),%edx
10c5ac: 52 push %edx
10c5ad: 8d 50 10 lea 0x10(%eax),%edx
10c5b0: 52 push %edx
10c5b1: 89 45 e4 mov %eax,-0x1c(%ebp)
10c5b4: e8 3b 1e 00 00 call 10e3f4 <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10c5b9: 8b 45 e4 mov -0x1c(%ebp),%eax
10c5bc: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10c5bf: 0f b7 f2 movzwl %dx,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c5c2: 8b 0d 3c ba 12 00 mov 0x12ba3c,%ecx
10c5c8: 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;
10c5cb: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
10c5d2: 89 13 mov %edx,(%ebx)
_Thread_Enable_dispatch();
10c5d4: e8 6f 36 00 00 call 10fc48 <_Thread_Enable_dispatch>
return 0;
10c5d9: 83 c4 10 add $0x10,%esp
10c5dc: 31 c0 xor %eax,%eax
}
10c5de: 8d 65 f8 lea -0x8(%ebp),%esp
10c5e1: 5b pop %ebx
10c5e2: 5e pop %esi
10c5e3: c9 leave
10c5e4: c3 ret
10c5e5: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
10c5e8: e8 5b 36 00 00 call 10fc48 <_Thread_Enable_dispatch>
return EAGAIN;
10c5ed: b8 0b 00 00 00 mov $0xb,%eax
10c5f2: eb 84 jmp 10c578 <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 );
10c5f4: 83 ec 0c sub $0xc,%esp
10c5f7: 8d 75 ec lea -0x14(%ebp),%esi
10c5fa: 56 push %esi
10c5fb: e8 84 09 00 00 call 10cf84 <pthread_rwlockattr_init>
10c600: 83 c4 10 add $0x10,%esp
10c603: e9 5e ff ff ff jmp 10c566 <pthread_rwlock_init+0x1a>
0010c670 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10c670: 55 push %ebp
10c671: 89 e5 mov %esp,%ebp
10c673: 56 push %esi
10c674: 53 push %ebx
10c675: 83 ec 20 sub $0x20,%esp
10c678: 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 )
10c67b: 85 db test %ebx,%ebx
10c67d: 74 7d je 10c6fc <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 );
10c67f: 83 ec 08 sub $0x8,%esp
10c682: 8d 45 f0 lea -0x10(%ebp),%eax
10c685: 50 push %eax
10c686: ff 75 0c pushl 0xc(%ebp)
10c689: e8 f6 62 00 00 call 112984 <_POSIX_Absolute_timeout_to_ticks>
10c68e: 89 c6 mov %eax,%esi
10c690: 83 c4 0c add $0xc,%esp
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c693: 8d 45 f4 lea -0xc(%ebp),%eax
10c696: 50 push %eax
10c697: ff 33 pushl (%ebx)
10c699: 68 20 ba 12 00 push $0x12ba20
10c69e: e8 1d 2a 00 00 call 10f0c0 <_Objects_Get>
switch ( location ) {
10c6a3: 83 c4 10 add $0x10,%esp
10c6a6: 8b 55 f4 mov -0xc(%ebp),%edx
10c6a9: 85 d2 test %edx,%edx
10c6ab: 75 4f jne 10c6fc <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,
10c6ad: 83 fe 03 cmp $0x3,%esi
10c6b0: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
10c6b3: 83 ec 0c sub $0xc,%esp
10c6b6: 6a 00 push $0x0
10c6b8: ff 75 f0 pushl -0x10(%ebp)
10c6bb: 0f b6 ca movzbl %dl,%ecx
10c6be: 51 push %ecx
10c6bf: ff 33 pushl (%ebx)
10c6c1: 83 c0 10 add $0x10,%eax
10c6c4: 50 push %eax
10c6c5: 88 55 e4 mov %dl,-0x1c(%ebp)
10c6c8: e8 5b 1d 00 00 call 10e428 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10c6cd: 83 c4 20 add $0x20,%esp
10c6d0: e8 73 35 00 00 call 10fc48 <_Thread_Enable_dispatch>
if ( !do_wait ) {
10c6d5: 8a 55 e4 mov -0x1c(%ebp),%dl
10c6d8: 84 d2 test %dl,%dl
10c6da: 75 40 jne 10c71c <pthread_rwlock_timedrdlock+0xac>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
10c6dc: a1 78 bd 12 00 mov 0x12bd78,%eax
10c6e1: 8b 40 34 mov 0x34(%eax),%eax
10c6e4: 83 f8 02 cmp $0x2,%eax
10c6e7: 74 1f je 10c708 <pthread_rwlock_timedrdlock+0x98>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c6e9: 83 ec 0c sub $0xc,%esp
10c6ec: 50 push %eax
10c6ed: e8 ee 00 00 00 call 10c7e0 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10c6f2: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c6f5: 8d 65 f8 lea -0x8(%ebp),%esp
10c6f8: 5b pop %ebx
10c6f9: 5e pop %esi
10c6fa: c9 leave
10c6fb: c3 ret
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
10c6fc: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c701: 8d 65 f8 lea -0x8(%ebp),%esp
10c704: 5b pop %ebx
10c705: 5e pop %esi
10c706: c9 leave
10c707: c3 ret
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10c708: 85 f6 test %esi,%esi
10c70a: 74 f0 je 10c6fc <pthread_rwlock_timedrdlock+0x8c><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10c70c: 4e dec %esi
10c70d: 83 fe 01 cmp $0x1,%esi
10c710: 77 d7 ja 10c6e9 <pthread_rwlock_timedrdlock+0x79><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10c712: b8 74 00 00 00 mov $0x74,%eax
10c717: eb e8 jmp 10c701 <pthread_rwlock_timedrdlock+0x91>
10c719: 8d 76 00 lea 0x0(%esi),%esi
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
10c71c: a1 78 bd 12 00 mov 0x12bd78,%eax
10c721: 8b 40 34 mov 0x34(%eax),%eax
10c724: eb c3 jmp 10c6e9 <pthread_rwlock_timedrdlock+0x79>
0010c728 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
10c728: 55 push %ebp
10c729: 89 e5 mov %esp,%ebp
10c72b: 56 push %esi
10c72c: 53 push %ebx
10c72d: 83 ec 20 sub $0x20,%esp
10c730: 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 )
10c733: 85 db test %ebx,%ebx
10c735: 74 7d je 10c7b4 <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 );
10c737: 83 ec 08 sub $0x8,%esp
10c73a: 8d 45 f0 lea -0x10(%ebp),%eax
10c73d: 50 push %eax
10c73e: ff 75 0c pushl 0xc(%ebp)
10c741: e8 3e 62 00 00 call 112984 <_POSIX_Absolute_timeout_to_ticks>
10c746: 89 c6 mov %eax,%esi
10c748: 83 c4 0c add $0xc,%esp
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
10c74b: 8d 45 f4 lea -0xc(%ebp),%eax
10c74e: 50 push %eax
10c74f: ff 33 pushl (%ebx)
10c751: 68 20 ba 12 00 push $0x12ba20
10c756: e8 65 29 00 00 call 10f0c0 <_Objects_Get>
switch ( location ) {
10c75b: 83 c4 10 add $0x10,%esp
10c75e: 8b 55 f4 mov -0xc(%ebp),%edx
10c761: 85 d2 test %edx,%edx
10c763: 75 4f jne 10c7b4 <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,
10c765: 83 fe 03 cmp $0x3,%esi
10c768: 0f 94 c2 sete %dl
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
10c76b: 83 ec 0c sub $0xc,%esp
10c76e: 6a 00 push $0x0
10c770: ff 75 f0 pushl -0x10(%ebp)
10c773: 0f b6 ca movzbl %dl,%ecx
10c776: 51 push %ecx
10c777: ff 33 pushl (%ebx)
10c779: 83 c0 10 add $0x10,%eax
10c77c: 50 push %eax
10c77d: 88 55 e4 mov %dl,-0x1c(%ebp)
10c780: e8 6b 1d 00 00 call 10e4f0 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
10c785: 83 c4 20 add $0x20,%esp
10c788: e8 bb 34 00 00 call 10fc48 <_Thread_Enable_dispatch>
if ( !do_wait &&
10c78d: 8a 55 e4 mov -0x1c(%ebp),%dl
10c790: 84 d2 test %dl,%dl
10c792: 75 40 jne 10c7d4 <pthread_rwlock_timedwrlock+0xac>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
10c794: a1 78 bd 12 00 mov 0x12bd78,%eax
10c799: 8b 40 34 mov 0x34(%eax),%eax
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
10c79c: 83 f8 02 cmp $0x2,%eax
10c79f: 74 1f je 10c7c0 <pthread_rwlock_timedwrlock+0x98>
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
10c7a1: 83 ec 0c sub $0xc,%esp
10c7a4: 50 push %eax
10c7a5: e8 36 00 00 00 call 10c7e0 <_POSIX_RWLock_Translate_core_RWLock_return_code>
10c7aa: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c7ad: 8d 65 f8 lea -0x8(%ebp),%esp
10c7b0: 5b pop %ebx
10c7b1: 5e pop %esi
10c7b2: c9 leave
10c7b3: c3 ret
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
10c7b4: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
10c7b9: 8d 65 f8 lea -0x8(%ebp),%esp
10c7bc: 5b pop %ebx
10c7bd: 5e pop %esi
10c7be: c9 leave
10c7bf: c3 ret
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
10c7c0: 85 f6 test %esi,%esi
10c7c2: 74 f0 je 10c7b4 <pthread_rwlock_timedwrlock+0x8c><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
10c7c4: 4e dec %esi
10c7c5: 83 fe 01 cmp $0x1,%esi
10c7c8: 77 d7 ja 10c7a1 <pthread_rwlock_timedwrlock+0x79><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
10c7ca: b8 74 00 00 00 mov $0x74,%eax
10c7cf: eb e8 jmp 10c7b9 <pthread_rwlock_timedwrlock+0x91>
10c7d1: 8d 76 00 lea 0x0(%esi),%esi
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
10c7d4: a1 78 bd 12 00 mov 0x12bd78,%eax
10c7d9: 8b 40 34 mov 0x34(%eax),%eax
10c7dc: eb c3 jmp 10c7a1 <pthread_rwlock_timedwrlock+0x79>
0010cf3c <pthread_rwlockattr_destroy>:
*/
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
10cf3c: 55 push %ebp
10cf3d: 89 e5 mov %esp,%ebp
10cf3f: 8b 45 08 mov 0x8(%ebp),%eax
if ( !attr || attr->is_initialized == false )
10cf42: 85 c0 test %eax,%eax
10cf44: 74 12 je 10cf58 <pthread_rwlockattr_destroy+0x1c>
10cf46: 8b 10 mov (%eax),%edx
10cf48: 85 d2 test %edx,%edx
10cf4a: 74 0c je 10cf58 <pthread_rwlockattr_destroy+0x1c>
return EINVAL;
attr->is_initialized = false;
10cf4c: c7 00 00 00 00 00 movl $0x0,(%eax)
return 0;
10cf52: 31 c0 xor %eax,%eax
}
10cf54: c9 leave
10cf55: c3 ret
10cf56: 66 90 xchg %ax,%ax
int pthread_rwlockattr_destroy(
pthread_rwlockattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
10cf58: b8 16 00 00 00 mov $0x16,%eax
attr->is_initialized = false;
return 0;
}
10cf5d: c9 leave
10cf5e: c3 ret
0010cfa8 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
10cfa8: 55 push %ebp
10cfa9: 89 e5 mov %esp,%ebp
10cfab: 8b 45 08 mov 0x8(%ebp),%eax
10cfae: 8b 55 0c mov 0xc(%ebp),%edx
if ( !attr )
10cfb1: 85 c0 test %eax,%eax
10cfb3: 74 0b je 10cfc0 <pthread_rwlockattr_setpshared+0x18>
return EINVAL;
if ( !attr->is_initialized )
10cfb5: 8b 08 mov (%eax),%ecx
10cfb7: 85 c9 test %ecx,%ecx
10cfb9: 74 05 je 10cfc0 <pthread_rwlockattr_setpshared+0x18>
return EINVAL;
switch ( pshared ) {
10cfbb: 83 fa 01 cmp $0x1,%edx
10cfbe: 76 08 jbe 10cfc8 <pthread_rwlockattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
10cfc0: b8 16 00 00 00 mov $0x16,%eax
}
}
10cfc5: c9 leave
10cfc6: c3 ret
10cfc7: 90 nop
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
10cfc8: 89 50 04 mov %edx,0x4(%eax)
return 0;
10cfcb: 31 c0 xor %eax,%eax
default:
return EINVAL;
}
}
10cfcd: c9 leave
10cfce: c3 ret
0010b25c <pthread_setcancelstate>:
int pthread_setcancelstate(
int state,
int *oldstate
)
{
10b25c: 55 push %ebp
10b25d: 89 e5 mov %esp,%ebp
10b25f: 53 push %ebx
10b260: 83 ec 04 sub $0x4,%esp
10b263: 8b 55 08 mov 0x8(%ebp),%edx
10b266: 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() )
10b269: 8b 0d f4 96 12 00 mov 0x1296f4,%ecx
10b26f: 85 c9 test %ecx,%ecx
10b271: 75 15 jne 10b288 <pthread_setcancelstate+0x2c>
return EPROTO;
if ( !oldstate )
10b273: 85 c0 test %eax,%eax
10b275: 74 05 je 10b27c <pthread_setcancelstate+0x20>
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
10b277: 83 fa 01 cmp $0x1,%edx
10b27a: 76 18 jbe 10b294 <pthread_setcancelstate+0x38>
return EINVAL;
10b27c: b8 16 00 00 00 mov $0x16,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b281: 8b 5d fc mov -0x4(%ebp),%ebx
10b284: c9 leave
10b285: c3 ret
10b286: 66 90 xchg %ax,%ax
* 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;
10b288: b8 47 00 00 00 mov $0x47,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b28d: 8b 5d fc mov -0x4(%ebp),%ebx
10b290: c9 leave
10b291: c3 ret
10b292: 66 90 xchg %ax,%ax
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b294: 8b 0d f8 96 12 00 mov 0x1296f8,%ecx
10b29a: 8b 89 ec 00 00 00 mov 0xec(%ecx),%ecx
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b2a0: 8b 1d 50 91 12 00 mov 0x129150,%ebx
10b2a6: 43 inc %ebx
10b2a7: 89 1d 50 91 12 00 mov %ebx,0x129150
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
10b2ad: 8b 99 d8 00 00 00 mov 0xd8(%ecx),%ebx
10b2b3: 89 18 mov %ebx,(%eax)
thread_support->cancelability_state = state;
10b2b5: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
10b2bb: 83 ec 0c sub $0xc,%esp
10b2be: ff 35 f8 96 12 00 pushl 0x1296f8
10b2c4: e8 93 54 00 00 call 11075c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b2c9: 83 c4 10 add $0x10,%esp
10b2cc: 31 c0 xor %eax,%eax
}
10b2ce: 8b 5d fc mov -0x4(%ebp),%ebx
10b2d1: c9 leave
10b2d2: c3 ret
0010b2d4 <pthread_setcanceltype>:
int pthread_setcanceltype(
int type,
int *oldtype
)
{
10b2d4: 55 push %ebp
10b2d5: 89 e5 mov %esp,%ebp
10b2d7: 53 push %ebx
10b2d8: 83 ec 04 sub $0x4,%esp
10b2db: 8b 55 08 mov 0x8(%ebp),%edx
10b2de: 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() )
10b2e1: 8b 0d f4 96 12 00 mov 0x1296f4,%ecx
10b2e7: 85 c9 test %ecx,%ecx
10b2e9: 75 15 jne 10b300 <pthread_setcanceltype+0x2c>
return EPROTO;
if ( !oldtype )
10b2eb: 85 c0 test %eax,%eax
10b2ed: 74 05 je 10b2f4 <pthread_setcanceltype+0x20>
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
10b2ef: 83 fa 01 cmp $0x1,%edx
10b2f2: 76 18 jbe 10b30c <pthread_setcanceltype+0x38>
return EINVAL;
10b2f4: b8 16 00 00 00 mov $0x16,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b2f9: 8b 5d fc mov -0x4(%ebp),%ebx
10b2fc: c9 leave
10b2fd: c3 ret
10b2fe: 66 90 xchg %ax,%ax
* 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;
10b300: b8 47 00 00 00 mov $0x47,%eax
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
10b305: 8b 5d fc mov -0x4(%ebp),%ebx
10b308: c9 leave
10b309: c3 ret
10b30a: 66 90 xchg %ax,%ax
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10b30c: 8b 0d f8 96 12 00 mov 0x1296f8,%ecx
10b312: 8b 89 ec 00 00 00 mov 0xec(%ecx),%ecx
10b318: 8b 1d 50 91 12 00 mov 0x129150,%ebx
10b31e: 43 inc %ebx
10b31f: 89 1d 50 91 12 00 mov %ebx,0x129150
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
10b325: 8b 99 dc 00 00 00 mov 0xdc(%ecx),%ebx
10b32b: 89 18 mov %ebx,(%eax)
thread_support->cancelability_type = type;
10b32d: 89 91 dc 00 00 00 mov %edx,0xdc(%ecx)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
10b333: 83 ec 0c sub $0xc,%esp
10b336: ff 35 f8 96 12 00 pushl 0x1296f8
10b33c: e8 1b 54 00 00 call 11075c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
10b341: 83 c4 10 add $0x10,%esp
10b344: 31 c0 xor %eax,%eax
}
10b346: 8b 5d fc mov -0x4(%ebp),%ebx
10b349: c9 leave
10b34a: c3 ret
0010dd58 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
10dd58: 55 push %ebp
10dd59: 89 e5 mov %esp,%ebp
10dd5b: 57 push %edi
10dd5c: 56 push %esi
10dd5d: 53 push %ebx
10dd5e: 83 ec 2c sub $0x2c,%esp
10dd61: 8b 75 10 mov 0x10(%ebp),%esi
int rc;
/*
* Check all the parameters
*/
if ( !param )
10dd64: 85 f6 test %esi,%esi
10dd66: 0f 84 c8 00 00 00 je 10de34 <pthread_setschedparam+0xdc>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
10dd6c: 8d 45 e0 lea -0x20(%ebp),%eax
10dd6f: 50 push %eax
10dd70: 8d 45 e4 lea -0x1c(%ebp),%eax
10dd73: 50 push %eax
10dd74: 56 push %esi
10dd75: ff 75 0c pushl 0xc(%ebp)
10dd78: e8 23 5c 00 00 call 1139a0 <_POSIX_Thread_Translate_sched_param>
10dd7d: 89 c3 mov %eax,%ebx
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
10dd7f: 83 c4 10 add $0x10,%esp
10dd82: 85 c0 test %eax,%eax
10dd84: 74 0a je 10dd90 <pthread_setschedparam+0x38>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10dd86: 89 d8 mov %ebx,%eax
10dd88: 8d 65 f4 lea -0xc(%ebp),%esp
10dd8b: 5b pop %ebx
10dd8c: 5e pop %esi
10dd8d: 5f pop %edi
10dd8e: c9 leave
10dd8f: c3 ret
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
10dd90: 83 ec 08 sub $0x8,%esp
10dd93: 8d 45 dc lea -0x24(%ebp),%eax
10dd96: 50 push %eax
10dd97: ff 75 08 pushl 0x8(%ebp)
10dd9a: e8 45 2b 00 00 call 1108e4 <_Thread_Get>
10dd9f: 89 c2 mov %eax,%edx
switch ( location ) {
10dda1: 83 c4 10 add $0x10,%esp
10dda4: 8b 7d dc mov -0x24(%ebp),%edi
10dda7: 85 ff test %edi,%edi
10dda9: 0f 85 95 00 00 00 jne 10de44 <pthread_setschedparam+0xec>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10ddaf: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
10ddb5: 89 45 d4 mov %eax,-0x2c(%ebp)
if ( api->schedpolicy == SCHED_SPORADIC )
10ddb8: 83 b8 84 00 00 00 04 cmpl $0x4,0x84(%eax)
10ddbf: 0f 84 cb 00 00 00 je 10de90 <pthread_setschedparam+0x138>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
10ddc5: 8b 45 0c mov 0xc(%ebp),%eax
10ddc8: 8b 4d d4 mov -0x2c(%ebp),%ecx
10ddcb: 89 81 84 00 00 00 mov %eax,0x84(%ecx)
api->schedparam = *param;
10ddd1: 89 cf mov %ecx,%edi
10ddd3: 81 c7 88 00 00 00 add $0x88,%edi
10ddd9: b9 07 00 00 00 mov $0x7,%ecx
10ddde: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
the_thread->budget_algorithm = budget_algorithm;
10dde0: 8b 45 e4 mov -0x1c(%ebp),%eax
10dde3: 89 42 7c mov %eax,0x7c(%edx)
the_thread->budget_callout = budget_callout;
10dde6: 8b 45 e0 mov -0x20(%ebp),%eax
10dde9: 89 82 80 00 00 00 mov %eax,0x80(%edx)
switch ( api->schedpolicy ) {
10ddef: 8b 75 0c mov 0xc(%ebp),%esi
10ddf2: 85 f6 test %esi,%esi
10ddf4: 78 2e js 10de24 <pthread_setschedparam+0xcc><== NEVER TAKEN
10ddf6: 83 7d 0c 02 cmpl $0x2,0xc(%ebp)
10ddfa: 7f 58 jg 10de54 <pthread_setschedparam+0xfc>
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
10ddfc: a1 60 cd 12 00 mov 0x12cd60,%eax
10de01: 89 42 78 mov %eax,0x78(%edx)
10de04: 0f b6 05 3c 8a 12 00 movzbl 0x128a3c,%eax
10de0b: 8b 4d d4 mov -0x2c(%ebp),%ecx
10de0e: 2b 81 88 00 00 00 sub 0x88(%ecx),%eax
the_thread->real_priority =
10de14: 89 42 18 mov %eax,0x18(%edx)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
10de17: 51 push %ecx
10de18: 6a 01 push $0x1
10de1a: 50 push %eax
10de1b: 52 push %edx
10de1c: e8 67 26 00 00 call 110488 <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
10de21: 83 c4 10 add $0x10,%esp
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
10de24: e8 97 2a 00 00 call 1108c0 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10de29: 89 d8 mov %ebx,%eax
10de2b: 8d 65 f4 lea -0xc(%ebp),%esp
10de2e: 5b pop %ebx
10de2f: 5e pop %esi
10de30: 5f pop %edi
10de31: c9 leave
10de32: c3 ret
10de33: 90 nop
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
10de34: bb 16 00 00 00 mov $0x16,%ebx
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
10de39: 89 d8 mov %ebx,%eax
10de3b: 8d 65 f4 lea -0xc(%ebp),%esp
10de3e: 5b pop %ebx
10de3f: 5e pop %esi
10de40: 5f pop %edi
10de41: c9 leave
10de42: c3 ret
10de43: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
10de44: bb 03 00 00 00 mov $0x3,%ebx
}
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
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
10de54: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10de58: 75 ca jne 10de24 <pthread_setschedparam+0xcc><== NEVER TAKEN
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
10de5a: 8b 4d d4 mov -0x2c(%ebp),%ecx
10de5d: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax
10de63: 89 81 a4 00 00 00 mov %eax,0xa4(%ecx)
_Watchdog_Remove( &api->Sporadic_timer );
10de69: 83 ec 0c sub $0xc,%esp
10de6c: 89 c8 mov %ecx,%eax
10de6e: 05 a8 00 00 00 add $0xa8,%eax
10de73: 50 push %eax
10de74: 89 55 d0 mov %edx,-0x30(%ebp)
10de77: e8 4c 3a 00 00 call 1118c8 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
10de7c: 58 pop %eax
10de7d: 5a pop %edx
10de7e: 8b 55 d0 mov -0x30(%ebp),%edx
10de81: 52 push %edx
10de82: 6a 00 push $0x0
10de84: e8 b3 fd ff ff call 10dc3c <_POSIX_Threads_Sporadic_budget_TSR>
break;
10de89: 83 c4 10 add $0x10,%esp
10de8c: eb 96 jmp 10de24 <pthread_setschedparam+0xcc>
10de8e: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
10de90: 83 ec 0c sub $0xc,%esp
10de93: 05 a8 00 00 00 add $0xa8,%eax
10de98: 50 push %eax
10de99: 89 55 d0 mov %edx,-0x30(%ebp)
10de9c: e8 27 3a 00 00 call 1118c8 <_Watchdog_Remove>
10dea1: 83 c4 10 add $0x10,%esp
10dea4: 8b 55 d0 mov -0x30(%ebp),%edx
10dea7: e9 19 ff ff ff jmp 10ddc5 <pthread_setschedparam+0x6d>
00111d74 <pthread_sigmask>:
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
111d74: 55 push %ebp
111d75: 89 e5 mov %esp,%ebp
111d77: 56 push %esi
111d78: 53 push %ebx
111d79: 8b 4d 08 mov 0x8(%ebp),%ecx
111d7c: 8b 55 0c mov 0xc(%ebp),%edx
111d7f: 8b 5d 10 mov 0x10(%ebp),%ebx
POSIX_API_Control *api;
if ( !set && !oset )
111d82: 85 d2 test %edx,%edx
111d84: 0f 84 8a 00 00 00 je 111e14 <pthread_sigmask+0xa0>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
111d8a: a1 f8 a3 12 00 mov 0x12a3f8,%eax
111d8f: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
if ( oset )
111d95: 85 db test %ebx,%ebx
111d97: 74 0c je 111da5 <pthread_sigmask+0x31>
*oset = api->signals_blocked;
111d99: 8b b0 d0 00 00 00 mov 0xd0(%eax),%esi
111d9f: 89 33 mov %esi,(%ebx)
if ( !set )
111da1: 85 d2 test %edx,%edx
111da3: 74 3b je 111de0 <pthread_sigmask+0x6c>
return 0;
switch ( how ) {
111da5: 83 f9 01 cmp $0x1,%ecx
111da8: 74 5e je 111e08 <pthread_sigmask+0x94>
111daa: 83 f9 02 cmp $0x2,%ecx
111dad: 74 39 je 111de8 <pthread_sigmask+0x74>
111daf: 85 c9 test %ecx,%ecx
111db1: 75 41 jne 111df4 <pthread_sigmask+0x80>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
111db3: 8b 12 mov (%edx),%edx
111db5: 89 90 d0 00 00 00 mov %edx,0xd0(%eax)
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
111dbb: 8b 15 68 a6 12 00 mov 0x12a668,%edx
111dc1: 0b 90 d4 00 00 00 or 0xd4(%eax),%edx
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
111dc7: 8b 80 d0 00 00 00 mov 0xd0(%eax),%eax
111dcd: f7 d0 not %eax
111dcf: 85 c2 test %eax,%edx
111dd1: 74 0d je 111de0 <pthread_sigmask+0x6c>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
111dd3: e8 a4 c9 ff ff call 10e77c <_Thread_Dispatch>
}
return 0;
111dd8: 31 c0 xor %eax,%eax
}
111dda: 5b pop %ebx
111ddb: 5e pop %esi
111ddc: c9 leave
111ddd: c3 ret
111dde: 66 90 xchg %ax,%ax
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
111de0: 31 c0 xor %eax,%eax
}
111de2: 5b pop %ebx
111de3: 5e pop %esi
111de4: c9 leave
111de5: c3 ret
111de6: 66 90 xchg %ax,%ax
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
111de8: 8b 12 mov (%edx),%edx
111dea: f7 d2 not %edx
111dec: 21 90 d0 00 00 00 and %edx,0xd0(%eax)
break;
111df2: eb c7 jmp 111dbb <pthread_sigmask+0x47>
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
111df4: e8 e7 24 00 00 call 1142e0 <__errno>
111df9: c7 00 16 00 00 00 movl $0x16,(%eax)
111dff: b8 ff ff ff ff mov $0xffffffff,%eax
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
111e04: 5b pop %ebx
111e05: 5e pop %esi
111e06: c9 leave
111e07: c3 ret
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
111e08: 8b 12 mov (%edx),%edx
111e0a: 09 90 d0 00 00 00 or %edx,0xd0(%eax)
break;
111e10: eb a9 jmp 111dbb <pthread_sigmask+0x47>
111e12: 66 90 xchg %ax,%ax
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
111e14: 85 db test %ebx,%ebx
111e16: 74 dc je 111df4 <pthread_sigmask+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
111e18: a1 f8 a3 12 00 mov 0x12a3f8,%eax
111e1d: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
111e23: e9 71 ff ff ff jmp 111d99 <pthread_sigmask+0x25>
0010bbc8 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
10bbc8: 55 push %ebp
10bbc9: 89 e5 mov %esp,%ebp
10bbcb: 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() )
10bbce: 8b 0d 94 9e 12 00 mov 0x129e94,%ecx
10bbd4: 85 c9 test %ecx,%ecx
10bbd6: 75 44 jne 10bc1c <pthread_testcancel+0x54><== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
10bbd8: a1 98 9e 12 00 mov 0x129e98,%eax
10bbdd: 8b 80 ec 00 00 00 mov 0xec(%eax),%eax
10bbe3: 8b 15 f0 98 12 00 mov 0x1298f0,%edx
10bbe9: 42 inc %edx
10bbea: 89 15 f0 98 12 00 mov %edx,0x1298f0
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
10bbf0: 8b 90 d8 00 00 00 mov 0xd8(%eax),%edx
10bbf6: 85 d2 test %edx,%edx
10bbf8: 75 26 jne 10bc20 <pthread_testcancel+0x58><== NEVER TAKEN
10bbfa: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax
10bc00: 85 c0 test %eax,%eax
10bc02: 74 1c je 10bc20 <pthread_testcancel+0x58>
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10bc04: e8 8f 29 00 00 call 10e598 <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
10bc09: 83 ec 08 sub $0x8,%esp
10bc0c: 6a ff push $0xffffffff
10bc0e: ff 35 98 9e 12 00 pushl 0x129e98
10bc14: e8 8f 5b 00 00 call 1117a8 <_POSIX_Thread_Exit>
10bc19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10bc1c: c9 leave <== NOT EXECUTED
10bc1d: c3 ret <== NOT EXECUTED
10bc1e: 66 90 xchg %ax,%ax <== NOT EXECUTED
10bc20: c9 leave
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
10bc21: e9 72 29 00 00 jmp 10e598 <_Thread_Enable_dispatch>
0011f28c <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
11f28c: 55 push %ebp
11f28d: 89 e5 mov %esp,%ebp
11f28f: 53 push %ebx
11f290: 83 ec 04 sub $0x4,%esp
11f293: 8b 4d 08 mov 0x8(%ebp),%ecx
11f296: 8b 45 0c mov 0xc(%ebp),%eax
11f299: 8b 55 10 mov 0x10(%ebp),%edx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11f29c: 3b 0d 2c 3a 12 00 cmp 0x123a2c,%ecx
11f2a2: 73 50 jae 11f2f4 <read+0x68> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
11f2a4: c1 e1 03 shl $0x3,%ecx
11f2a7: 8d 1c cd 00 00 00 00 lea 0x0(,%ecx,8),%ebx
11f2ae: 29 cb sub %ecx,%ebx
11f2b0: 03 1d e0 7c 12 00 add 0x127ce0,%ebx
rtems_libio_check_is_open( iop );
11f2b6: 8b 4b 14 mov 0x14(%ebx),%ecx
11f2b9: f6 c5 01 test $0x1,%ch
11f2bc: 74 36 je 11f2f4 <read+0x68>
rtems_libio_check_buffer( buffer );
11f2be: 85 c0 test %eax,%eax
11f2c0: 74 46 je 11f308 <read+0x7c> <== NEVER TAKEN
rtems_libio_check_count( count );
11f2c2: 85 d2 test %edx,%edx
11f2c4: 74 26 je 11f2ec <read+0x60>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
11f2c6: 83 e1 02 and $0x2,%ecx
11f2c9: 74 3d je 11f308 <read+0x7c>
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
11f2cb: 51 push %ecx
11f2cc: 8b 4b 20 mov 0x20(%ebx),%ecx
11f2cf: 52 push %edx
11f2d0: 50 push %eax
11f2d1: 53 push %ebx
11f2d2: ff 51 08 call *0x8(%ecx)
if ( rc > 0 )
11f2d5: 83 c4 10 add $0x10,%esp
11f2d8: 85 c0 test %eax,%eax
11f2da: 7e 0b jle 11f2e7 <read+0x5b>
iop->offset += rc;
11f2dc: 89 c1 mov %eax,%ecx
11f2de: c1 f9 1f sar $0x1f,%ecx
11f2e1: 01 43 0c add %eax,0xc(%ebx)
11f2e4: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
11f2e7: 8b 5d fc mov -0x4(%ebp),%ebx
11f2ea: c9 leave
11f2eb: c3 ret
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 );
11f2ec: 31 c0 xor %eax,%eax
if ( rc > 0 )
iop->offset += rc;
return rc;
}
11f2ee: 8b 5d fc mov -0x4(%ebp),%ebx
11f2f1: c9 leave
11f2f2: c3 ret
11f2f3: 90 nop
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
11f2f4: e8 eb 3f ff ff call 1132e4 <__errno>
11f2f9: c7 00 09 00 00 00 movl $0x9,(%eax)
11f2ff: b8 ff ff ff ff mov $0xffffffff,%eax
11f304: eb e1 jmp 11f2e7 <read+0x5b>
11f306: 66 90 xchg %ax,%ax
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
11f308: e8 d7 3f ff ff call 1132e4 <__errno>
11f30d: c7 00 16 00 00 00 movl $0x16,(%eax)
11f313: b8 ff ff ff ff mov $0xffffffff,%eax
11f318: eb cd jmp 11f2e7 <read+0x5b>
0010b0b0 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
10b0b0: 55 push %ebp
10b0b1: 89 e5 mov %esp,%ebp
10b0b3: 57 push %edi
10b0b4: 56 push %esi
10b0b5: 53 push %ebx
10b0b6: 83 ec 3c sub $0x3c,%esp
10b0b9: 8b 55 08 mov 0x8(%ebp),%edx
10b0bc: 8b 5d 0c mov 0xc(%ebp),%ebx
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
10b0bf: 85 db test %ebx,%ebx
10b0c1: 74 6d je 10b130 <readlink+0x80>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
10b0c3: 31 c0 xor %eax,%eax
10b0c5: b9 ff ff ff ff mov $0xffffffff,%ecx
10b0ca: 89 d7 mov %edx,%edi
10b0cc: f2 ae repnz scas %es:(%edi),%al
10b0ce: f7 d1 not %ecx
10b0d0: 49 dec %ecx
10b0d1: 83 ec 0c sub $0xc,%esp
10b0d4: 6a 00 push $0x0
10b0d6: 8d 75 d4 lea -0x2c(%ebp),%esi
10b0d9: 56 push %esi
10b0da: 6a 00 push $0x0
10b0dc: 51 push %ecx
10b0dd: 52 push %edx
10b0de: e8 51 ee ff ff call 109f34 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
10b0e3: 83 c4 20 add $0x20,%esp
10b0e6: 85 c0 test %eax,%eax
10b0e8: 74 0e je 10b0f8 <readlink+0x48> <== ALWAYS TAKEN
return -1;
10b0ea: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
10b0ef: 8d 65 f4 lea -0xc(%ebp),%esp
10b0f2: 5b pop %ebx
10b0f3: 5e pop %esi
10b0f4: 5f pop %edi
10b0f5: c9 leave
10b0f6: c3 ret
10b0f7: 90 nop
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 ){
10b0f8: 83 ec 0c sub $0xc,%esp
10b0fb: 56 push %esi
10b0fc: 8b 45 e0 mov -0x20(%ebp),%eax
10b0ff: ff 50 10 call *0x10(%eax)
10b102: 83 c4 10 add $0x10,%esp
10b105: 83 f8 04 cmp $0x4,%eax
10b108: 75 3e jne 10b148 <readlink+0x98>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
10b10a: 50 push %eax
10b10b: ff 75 10 pushl 0x10(%ebp)
10b10e: 53 push %ebx
10b10f: 56 push %esi
10b110: 8b 45 e0 mov -0x20(%ebp),%eax
10b113: ff 50 3c call *0x3c(%eax)
rtems_filesystem_freenode( &loc );
10b116: 89 34 24 mov %esi,(%esp)
10b119: 89 45 c4 mov %eax,-0x3c(%ebp)
10b11c: e8 eb ee ff ff call 10a00c <rtems_filesystem_freenode>
return result;
10b121: 83 c4 10 add $0x10,%esp
10b124: 8b 45 c4 mov -0x3c(%ebp),%eax
}
10b127: 8d 65 f4 lea -0xc(%ebp),%esp
10b12a: 5b pop %ebx
10b12b: 5e pop %esi
10b12c: 5f pop %edi
10b12d: c9 leave
10b12e: c3 ret
10b12f: 90 nop
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
10b130: e8 cb ac 00 00 call 115e00 <__errno>
10b135: c7 00 0e 00 00 00 movl $0xe,(%eax)
10b13b: b8 ff ff ff ff mov $0xffffffff,%eax
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
10b140: 8d 65 f4 lea -0xc(%ebp),%esp
10b143: 5b pop %ebx
10b144: 5e pop %esi
10b145: 5f pop %edi
10b146: c9 leave
10b147: c3 ret
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
10b148: 83 ec 0c sub $0xc,%esp
10b14b: 56 push %esi
10b14c: e8 bb ee ff ff call 10a00c <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
10b151: e8 aa ac 00 00 call 115e00 <__errno>
10b156: c7 00 16 00 00 00 movl $0x16,(%eax)
10b15c: 83 c4 10 add $0x10,%esp
10b15f: b8 ff ff ff ff mov $0xffffffff,%eax
10b164: eb 89 jmp 10b0ef <readlink+0x3f>
00109d74 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
109d74: 55 push %ebp
109d75: 89 e5 mov %esp,%ebp
109d77: 57 push %edi
109d78: 56 push %esi
109d79: 53 push %ebx
109d7a: 83 ec 1c sub $0x1c,%esp
109d7d: 8b 45 08 mov 0x8(%ebp),%eax
109d80: 8b 5d 0c mov 0xc(%ebp),%ebx
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
109d83: 3b 05 4c 41 12 00 cmp 0x12414c,%eax
109d89: 0f 83 ef 00 00 00 jae 109e7e <readv+0x10a>
iop = rtems_libio_iop( fd );
109d8f: c1 e0 03 shl $0x3,%eax
109d92: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi
109d99: 29 c6 sub %eax,%esi
109d9b: 03 35 00 84 12 00 add 0x128400,%esi
rtems_libio_check_is_open( iop );
109da1: 8b 46 14 mov 0x14(%esi),%eax
109da4: f6 c4 01 test $0x1,%ah
109da7: 0f 84 d1 00 00 00 je 109e7e <readv+0x10a>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
109dad: a8 02 test $0x2,%al
109daf: 0f 84 97 00 00 00 je 109e4c <readv+0xd8> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
109db5: 85 db test %ebx,%ebx
109db7: 0f 84 8f 00 00 00 je 109e4c <readv+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
109dbd: 8b 7d 10 mov 0x10(%ebp),%edi
109dc0: 85 ff test %edi,%edi
109dc2: 0f 8e 84 00 00 00 jle 109e4c <readv+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
109dc8: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp)
109dcf: 7f 7b jg 109e4c <readv+0xd8> <== NEVER TAKEN
109dd1: c6 45 e4 01 movb $0x1,-0x1c(%ebp)
109dd5: 31 c0 xor %eax,%eax
109dd7: 31 d2 xor %edx,%edx
109dd9: eb 03 jmp 109dde <readv+0x6a>
109ddb: 90 nop
if ( iov[v].iov_base == 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
109ddc: 89 fa mov %edi,%edx
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
109dde: 8b 0c c3 mov (%ebx,%eax,8),%ecx
109de1: 85 c9 test %ecx,%ecx
109de3: 74 67 je 109e4c <readv+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
109de5: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx
109de9: 8d 3c 0a lea (%edx,%ecx,1),%edi
if ( total < old )
109dec: 39 fa cmp %edi,%edx
109dee: 7f 5c jg 109e4c <readv+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
109df0: 85 c9 test %ecx,%ecx
109df2: 74 04 je 109df8 <readv+0x84>
all_zeros = false;
109df4: 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++ ) {
109df8: 40 inc %eax
109df9: 39 45 10 cmp %eax,0x10(%ebp)
109dfc: 7f de jg 109ddc <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 ) {
109dfe: 80 7d e4 00 cmpb $0x0,-0x1c(%ebp)
109e02: 75 68 jne 109e6c <readv+0xf8>
109e04: 31 ff xor %edi,%edi
109e06: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
109e0d: eb 1d jmp 109e2c <readv+0xb8>
109e0f: 90 nop
);
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
109e10: 74 0e je 109e20 <readv+0xac> <== NEVER TAKEN
iop->offset += bytes;
109e12: 89 c1 mov %eax,%ecx
109e14: c1 f9 1f sar $0x1f,%ecx
109e17: 01 46 0c add %eax,0xc(%esi)
109e1a: 11 4e 10 adc %ecx,0x10(%esi)
total += bytes;
109e1d: 01 45 e4 add %eax,-0x1c(%ebp)
}
if (bytes != iov[ v ].iov_len)
109e20: 3b 44 fb 04 cmp 0x4(%ebx,%edi,8),%eax
109e24: 75 38 jne 109e5e <readv+0xea> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
109e26: 47 inc %edi
109e27: 39 7d 10 cmp %edi,0x10(%ebp)
109e2a: 7e 32 jle 109e5e <readv+0xea>
bytes = (*iop->pathinfo.handlers->read_h)(
109e2c: 50 push %eax
109e2d: 8b 46 20 mov 0x20(%esi),%eax
109e30: ff 74 fb 04 pushl 0x4(%ebx,%edi,8)
109e34: ff 34 fb pushl (%ebx,%edi,8)
109e37: 56 push %esi
109e38: ff 50 08 call *0x8(%eax)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
109e3b: 83 c4 10 add $0x10,%esp
109e3e: 83 f8 00 cmp $0x0,%eax
109e41: 7d cd jge 109e10 <readv+0x9c> <== ALWAYS TAKEN
return -1;
109e43: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED
109e4a: eb 12 jmp 109e5e <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 );
109e4c: e8 23 a2 00 00 call 114074 <__errno>
109e51: c7 00 16 00 00 00 movl $0x16,(%eax)
109e57: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
109e5e: 8b 45 e4 mov -0x1c(%ebp),%eax
109e61: 8d 65 f4 lea -0xc(%ebp),%esp
109e64: 5b pop %ebx
109e65: 5e pop %esi
109e66: 5f pop %edi
109e67: c9 leave
109e68: c3 ret
109e69: 8d 76 00 lea 0x0(%esi),%esi
* 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;
109e6c: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
109e73: 8b 45 e4 mov -0x1c(%ebp),%eax
109e76: 8d 65 f4 lea -0xc(%ebp),%esp
109e79: 5b pop %ebx
109e7a: 5e pop %esi
109e7b: 5f pop %edi
109e7c: c9 leave
109e7d: 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 );
109e7e: e8 f1 a1 00 00 call 114074 <__errno>
109e83: c7 00 09 00 00 00 movl $0x9,(%eax)
109e89: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp)
109e90: eb cc jmp 109e5e <readv+0xea>
0011f3a8 <realloc>:
void *realloc(
void *ptr,
size_t size
)
{
11f3a8: 55 push %ebp
11f3a9: 89 e5 mov %esp,%ebp
11f3ab: 57 push %edi
11f3ac: 56 push %esi
11f3ad: 53 push %ebx
11f3ae: 83 ec 2c sub $0x2c,%esp
11f3b1: 8b 5d 08 mov 0x8(%ebp),%ebx
11f3b4: 8b 75 0c mov 0xc(%ebp),%esi
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
11f3b7: ff 05 10 7d 12 00 incl 0x127d10
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
11f3bd: 83 3d e0 7f 12 00 03 cmpl $0x3,0x127fe0
11f3c4: 74 72 je 11f438 <realloc+0x90> <== ALWAYS TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
11f3c6: 85 db test %ebx,%ebx
11f3c8: 74 5e je 11f428 <realloc+0x80>
return malloc( size );
if ( !size ) {
11f3ca: 85 f6 test %esi,%esi
11f3cc: 74 3a je 11f408 <realloc+0x60> <== NEVER TAKEN
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
11f3ce: 52 push %edx
11f3cf: 8d 45 e4 lea -0x1c(%ebp),%eax
11f3d2: 50 push %eax
11f3d3: 53 push %ebx
11f3d4: ff 35 70 3a 12 00 pushl 0x123a70
11f3da: e8 49 01 00 00 call 11f528 <_Protected_heap_Get_block_size>
11f3df: 83 c4 10 add $0x10,%esp
11f3e2: 84 c0 test %al,%al
11f3e4: 74 32 je 11f418 <realloc+0x70>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
11f3e6: 50 push %eax
11f3e7: 56 push %esi
11f3e8: 53 push %ebx
11f3e9: ff 35 70 3a 12 00 pushl 0x123a70
11f3ef: e8 6c 01 00 00 call 11f560 <_Protected_heap_Resize_block>
11f3f4: 83 c4 10 add $0x10,%esp
11f3f7: 84 c0 test %al,%al
11f3f9: 74 5d je 11f458 <realloc+0xb0>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
11f3fb: 89 d8 mov %ebx,%eax
11f3fd: 8d 65 f4 lea -0xc(%ebp),%esp
11f400: 5b pop %ebx
11f401: 5e pop %esi
11f402: 5f pop %edi
11f403: c9 leave
11f404: c3 ret
11f405: 8d 76 00 lea 0x0(%esi),%esi
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
11f408: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
11f40b: 53 push %ebx <== NOT EXECUTED
11f40c: e8 c3 8c fe ff call 1080d4 <free> <== NOT EXECUTED
return (void *) 0;
11f411: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
11f414: 31 db xor %ebx,%ebx <== NOT EXECUTED
11f416: eb e3 jmp 11f3fb <realloc+0x53> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
11f418: e8 c7 3e ff ff call 1132e4 <__errno>
11f41d: c7 00 16 00 00 00 movl $0x16,(%eax)
return (void *) 0;
11f423: 31 db xor %ebx,%ebx
11f425: eb d4 jmp 11f3fb <realloc+0x53>
11f427: 90 nop
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
11f428: 83 ec 0c sub $0xc,%esp
11f42b: 56 push %esi
11f42c: e8 77 8f fe ff call 1083a8 <malloc>
11f431: 89 c3 mov %eax,%ebx
11f433: 83 c4 10 add $0x10,%esp
11f436: eb c3 jmp 11f3fb <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)
11f438: a1 50 7e 12 00 mov 0x127e50,%eax
11f43d: 85 c0 test %eax,%eax
11f43f: 74 04 je 11f445 <realloc+0x9d> <== ALWAYS TAKEN
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
11f441: 31 db xor %ebx,%ebx
11f443: eb b6 jmp 11f3fb <realloc+0x53>
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
11f445: 8b 0d f4 83 12 00 mov 0x1283f4,%ecx
11f44b: 85 c9 test %ecx,%ecx
11f44d: 0f 84 73 ff ff ff je 11f3c6 <realloc+0x1e> <== ALWAYS TAKEN
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
11f453: 31 db xor %ebx,%ebx
11f455: eb a4 jmp 11f3fb <realloc+0x53> <== NOT EXECUTED
11f457: 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 );
11f458: 83 ec 0c sub $0xc,%esp
11f45b: 56 push %esi
11f45c: e8 47 8f fe ff call 1083a8 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
11f461: ff 0d 04 7d 12 00 decl 0x127d04
if ( !new_area ) {
11f467: 83 c4 10 add $0x10,%esp
11f46a: 85 c0 test %eax,%eax
11f46c: 74 d3 je 11f441 <realloc+0x99>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
11f46e: 8b 55 e4 mov -0x1c(%ebp),%edx
11f471: 89 f1 mov %esi,%ecx
11f473: 39 d6 cmp %edx,%esi
11f475: 76 02 jbe 11f479 <realloc+0xd1> <== NEVER TAKEN
11f477: 89 d1 mov %edx,%ecx
11f479: 89 c7 mov %eax,%edi
11f47b: 89 de mov %ebx,%esi
11f47d: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
free( ptr );
11f47f: 83 ec 0c sub $0xc,%esp
11f482: 53 push %ebx
11f483: 89 45 d4 mov %eax,-0x2c(%ebp)
11f486: e8 49 8c fe ff call 1080d4 <free>
return new_area;
11f48b: 83 c4 10 add $0x10,%esp
11f48e: 8b 45 d4 mov -0x2c(%ebp),%eax
11f491: 89 c3 mov %eax,%ebx
11f493: e9 63 ff ff ff jmp 11f3fb <realloc+0x53>
00109348 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
109348: 55 push %ebp
109349: 89 e5 mov %esp,%ebp
10934b: 57 push %edi
10934c: 56 push %esi
10934d: 53 push %ebx
10934e: 83 ec 58 sub $0x58,%esp
109351: 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 );
109354: 53 push %ebx
109355: e8 1e f1 ff ff call 108478 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
10935a: 83 c4 10 add $0x10,%esp
10935d: 85 c0 test %eax,%eax
10935f: 0f 85 0f 01 00 00 jne 109474 <rmdir+0x12c>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
109365: 50 push %eax
109366: 8d 45 d0 lea -0x30(%ebp),%eax
109369: 89 45 b4 mov %eax,-0x4c(%ebp)
10936c: 50 push %eax
10936d: 8d 45 e4 lea -0x1c(%ebp),%eax
109370: 50 push %eax
109371: 53 push %ebx
109372: e8 45 01 00 00 call 1094bc <rtems_filesystem_get_start_loc>
109377: 83 c4 10 add $0x10,%esp
10937a: 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;
10937c: c6 45 b3 00 movb $0x0,-0x4d(%ebp)
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
109380: 8d 7d bc lea -0x44(%ebp),%edi
109383: b9 05 00 00 00 mov $0x5,%ecx
109388: 8b 75 b4 mov -0x4c(%ebp),%esi
10938b: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = pathname + parentpathlen;
10938d: 01 d3 add %edx,%ebx
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
10938f: be ff ff ff ff mov $0xffffffff,%esi
109394: 89 f1 mov %esi,%ecx
109396: 89 df mov %ebx,%edi
109398: 31 c0 xor %eax,%eax
10939a: f2 ae repnz scas %es:(%edi),%al
10939c: f7 d1 not %ecx
10939e: 49 dec %ecx
10939f: 83 ec 08 sub $0x8,%esp
1093a2: 51 push %ecx
1093a3: 53 push %ebx
1093a4: e8 13 f1 ff ff call 1084bc <rtems_filesystem_prefix_separators>
1093a9: 01 c3 add %eax,%ebx
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
1093ab: 89 f1 mov %esi,%ecx
1093ad: 89 df mov %ebx,%edi
1093af: 31 c0 xor %eax,%eax
1093b1: f2 ae repnz scas %es:(%edi),%al
1093b3: f7 d1 not %ecx
1093b5: 49 dec %ecx
1093b6: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1093bd: 8d 75 bc lea -0x44(%ebp),%esi
1093c0: 56 push %esi
1093c1: 6a 00 push $0x0
1093c3: 51 push %ecx
1093c4: 53 push %ebx
1093c5: e8 02 f0 ff ff call 1083cc <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
1093ca: 83 c4 20 add $0x20,%esp
1093cd: 85 c0 test %eax,%eax
1093cf: 75 5b jne 10942c <rmdir+0xe4>
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
1093d1: 83 ec 0c sub $0xc,%esp
1093d4: 56 push %esi
1093d5: 8b 45 c8 mov -0x38(%ebp),%eax
1093d8: ff 50 10 call *0x10(%eax)
1093db: 83 c4 10 add $0x10,%esp
1093de: 48 dec %eax
1093df: 75 5f jne 109440 <rmdir+0xf8>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
1093e1: 83 ec 08 sub $0x8,%esp
1093e4: 56 push %esi
1093e5: ff 75 b4 pushl -0x4c(%ebp)
1093e8: 8b 45 c4 mov -0x3c(%ebp),%eax
1093eb: ff 50 34 call *0x34(%eax)
rtems_filesystem_freenode( &loc );
1093ee: 89 34 24 mov %esi,(%esp)
1093f1: 89 45 ac mov %eax,-0x54(%ebp)
1093f4: e8 13 f1 ff ff call 10850c <rtems_filesystem_freenode>
if ( free_parentloc )
1093f9: 83 c4 10 add $0x10,%esp
1093fc: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
109400: 8b 45 ac mov -0x54(%ebp),%eax
109403: 75 0b jne 109410 <rmdir+0xc8>
rtems_filesystem_freenode( &parentloc );
return result;
}
109405: 8d 65 f4 lea -0xc(%ebp),%esp
109408: 5b pop %ebx
109409: 5e pop %esi
10940a: 5f pop %edi
10940b: c9 leave
10940c: c3 ret
10940d: 8d 76 00 lea 0x0(%esi),%esi
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
109410: 83 ec 0c sub $0xc,%esp
109413: ff 75 b4 pushl -0x4c(%ebp)
109416: e8 f1 f0 ff ff call 10850c <rtems_filesystem_freenode>
10941b: 83 c4 10 add $0x10,%esp
10941e: 8b 45 ac mov -0x54(%ebp),%eax
return result;
}
109421: 8d 65 f4 lea -0xc(%ebp),%esp
109424: 5b pop %ebx
109425: 5e pop %esi
109426: 5f pop %edi
109427: c9 leave
109428: c3 ret
109429: 8d 76 00 lea 0x0(%esi),%esi
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 )
10942c: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
109430: 75 6f jne 1094a1 <rmdir+0x159>
rtems_filesystem_freenode( &parentloc );
return -1;
109432: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
109437: 8d 65 f4 lea -0xc(%ebp),%esp
10943a: 5b pop %ebx
10943b: 5e pop %esi
10943c: 5f pop %edi
10943d: c9 leave
10943e: c3 ret
10943f: 90 nop
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
109440: 83 ec 0c sub $0xc,%esp
109443: 56 push %esi
109444: e8 c3 f0 ff ff call 10850c <rtems_filesystem_freenode>
if ( free_parentloc )
109449: 83 c4 10 add $0x10,%esp
10944c: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
109450: 74 0e je 109460 <rmdir+0x118> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
109452: 83 ec 0c sub $0xc,%esp
109455: ff 75 b4 pushl -0x4c(%ebp)
109458: e8 af f0 ff ff call 10850c <rtems_filesystem_freenode>
10945d: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( ENOTDIR );
109460: e8 17 a7 00 00 call 113b7c <__errno>
109465: c7 00 14 00 00 00 movl $0x14,(%eax)
10946b: b8 ff ff ff ff mov $0xffffffff,%eax
109470: eb 93 jmp 109405 <rmdir+0xbd>
109472: 66 90 xchg %ax,%ax
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
109474: 89 c2 mov %eax,%edx
109476: 83 ec 0c sub $0xc,%esp
109479: 6a 00 push $0x0
10947b: 8d 45 d0 lea -0x30(%ebp),%eax
10947e: 89 45 b4 mov %eax,-0x4c(%ebp)
109481: 50 push %eax
109482: 6a 02 push $0x2
109484: 52 push %edx
109485: 53 push %ebx
109486: 89 55 ac mov %edx,-0x54(%ebp)
109489: e8 a6 ef ff ff call 108434 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
10948e: 83 c4 20 add $0x20,%esp
109491: 85 c0 test %eax,%eax
109493: 8b 55 ac mov -0x54(%ebp),%edx
109496: 75 9a jne 109432 <rmdir+0xea> <== NEVER TAKEN
return -1;
free_parentloc = true;
109498: c6 45 b3 01 movb $0x1,-0x4d(%ebp)
10949c: e9 df fe ff ff jmp 109380 <rmdir+0x38>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
1094a1: 83 ec 0c sub $0xc,%esp
1094a4: ff 75 b4 pushl -0x4c(%ebp)
1094a7: e8 60 f0 ff ff call 10850c <rtems_filesystem_freenode>
1094ac: 83 c4 10 add $0x10,%esp
return -1;
1094af: b8 ff ff ff ff mov $0xffffffff,%eax
1094b4: e9 4c ff ff ff jmp 109405 <rmdir+0xbd>
0010c598 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
10c598: 55 push %ebp
10c599: 89 e5 mov %esp,%ebp
10c59b: 57 push %edi
10c59c: 56 push %esi
10c59d: 53 push %ebx
10c59e: 83 ec 58 sub $0x58,%esp
10c5a1: 8b 5d 08 mov 0x8(%ebp),%ebx
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
10c5a4: 68 a0 aa 12 00 push $0x12aaa0
10c5a9: e8 86 09 00 00 call 10cf34 <pthread_mutex_lock>
10c5ae: 89 c6 mov %eax,%esi
if (result != 0) {
10c5b0: 83 c4 10 add $0x10,%esp
10c5b3: 85 c0 test %eax,%eax
10c5b5: 0f 85 c1 00 00 00 jne 10c67c <rtems_aio_enqueue+0xe4><== NEVER TAKEN
return result;
}
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
10c5bb: e8 20 12 00 00 call 10d7e0 <pthread_self>
10c5c0: 51 push %ecx
10c5c1: 8d 55 c4 lea -0x3c(%ebp),%edx
10c5c4: 52 push %edx
10c5c5: 8d 55 e0 lea -0x20(%ebp),%edx
10c5c8: 52 push %edx
10c5c9: 50 push %eax
10c5ca: e8 e1 0d 00 00 call 10d3b0 <pthread_getschedparam>
req->caller_thread = pthread_self ();
10c5cf: e8 0c 12 00 00 call 10d7e0 <pthread_self>
10c5d4: 89 43 10 mov %eax,0x10(%ebx)
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
10c5d7: 8b 43 14 mov 0x14(%ebx),%eax
10c5da: 8b 55 c4 mov -0x3c(%ebp),%edx
10c5dd: 2b 50 14 sub 0x14(%eax),%edx
10c5e0: 89 53 0c mov %edx,0xc(%ebx)
req->policy = policy;
10c5e3: 8b 55 e0 mov -0x20(%ebp),%edx
10c5e6: 89 53 08 mov %edx,0x8(%ebx)
req->aiocbp->error_code = EINPROGRESS;
10c5e9: c7 40 30 77 00 00 00 movl $0x77,0x30(%eax)
req->aiocbp->return_value = 0;
10c5f0: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
if ((aio_request_queue.idle_threads == 0) &&
10c5f7: 83 c4 10 add $0x10,%esp
10c5fa: 8b 15 08 ab 12 00 mov 0x12ab08,%edx
10c600: 85 d2 test %edx,%edx
10c602: 75 0d jne 10c611 <rtems_aio_enqueue+0x79><== NEVER TAKEN
10c604: 83 3d 04 ab 12 00 04 cmpl $0x4,0x12ab04
10c60b: 0f 8e 83 00 00 00 jle 10c694 <rtems_aio_enqueue+0xfc>
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
10c611: 51 push %ecx
10c612: 6a 00 push $0x0
10c614: ff 30 pushl (%eax)
10c616: 68 e8 aa 12 00 push $0x12aae8
10c61b: e8 28 fb ff ff call 10c148 <rtems_aio_search_fd>
10c620: 89 c7 mov %eax,%edi
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
10c622: 83 c4 10 add $0x10,%esp
10c625: 85 c0 test %eax,%eax
10c627: 0f 84 df 00 00 00 je 10c70c <rtems_aio_enqueue+0x174>
{
pthread_mutex_lock (&r_chain->mutex);
10c62d: 8d 57 1c lea 0x1c(%edi),%edx
10c630: 83 ec 0c sub $0xc,%esp
10c633: 52 push %edx
10c634: 89 55 b4 mov %edx,-0x4c(%ebp)
10c637: e8 f8 08 00 00 call 10cf34 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
10c63c: 58 pop %eax
10c63d: 5a pop %edx
10c63e: 53 push %ebx
10c63f: 8d 47 08 lea 0x8(%edi),%eax
10c642: 50 push %eax
10c643: e8 48 fe ff ff call 10c490 <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
10c648: 83 c7 20 add $0x20,%edi
10c64b: 89 3c 24 mov %edi,(%esp)
10c64e: e8 b1 04 00 00 call 10cb04 <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
10c653: 8b 55 b4 mov -0x4c(%ebp),%edx
10c656: 89 14 24 mov %edx,(%esp)
10c659: e8 5e 09 00 00 call 10cfbc <pthread_mutex_unlock>
10c65e: 83 c4 10 add $0x10,%esp
if (aio_request_queue.idle_threads > 0)
pthread_cond_signal (&aio_request_queue.new_req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
10c661: 83 ec 0c sub $0xc,%esp
10c664: 68 a0 aa 12 00 push $0x12aaa0
10c669: e8 4e 09 00 00 call 10cfbc <pthread_mutex_unlock>
return 0;
10c66e: 83 c4 10 add $0x10,%esp
}
10c671: 89 f0 mov %esi,%eax
10c673: 8d 65 f4 lea -0xc(%ebp),%esp
10c676: 5b pop %ebx
10c677: 5e pop %esi
10c678: 5f pop %edi
10c679: c9 leave
10c67a: c3 ret
10c67b: 90 nop
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
if (result != 0) {
free (req);
10c67c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c67f: 53 push %ebx <== NOT EXECUTED
10c680: e8 cf c4 ff ff call 108b54 <free> <== NOT EXECUTED
return result;
10c685: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
return 0;
}
10c688: 89 f0 mov %esi,%eax <== NOT EXECUTED
10c68a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c68d: 5b pop %ebx <== NOT EXECUTED
10c68e: 5e pop %esi <== NOT EXECUTED
10c68f: 5f pop %edi <== NOT EXECUTED
10c690: c9 leave <== NOT EXECUTED
10c691: c3 ret <== NOT EXECUTED
10c692: 66 90 xchg %ax,%ax <== NOT EXECUTED
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
10c694: 57 push %edi
10c695: 6a 01 push $0x1
10c697: ff 30 pushl (%eax)
10c699: 68 e8 aa 12 00 push $0x12aae8
10c69e: e8 a5 fa ff ff call 10c148 <rtems_aio_search_fd>
10c6a3: 89 c7 mov %eax,%edi
if (r_chain->new_fd == 1) {
10c6a5: 83 c4 10 add $0x10,%esp
10c6a8: 83 78 18 01 cmpl $0x1,0x18(%eax)
10c6ac: 0f 85 7b ff ff ff jne 10c62d <rtems_aio_enqueue+0x95>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
10c6b2: 83 ec 08 sub $0x8,%esp
10c6b5: 53 push %ebx
10c6b6: 8d 40 08 lea 0x8(%eax),%eax
10c6b9: 50 push %eax
10c6ba: e8 79 22 00 00 call 10e938 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
10c6bf: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
pthread_mutex_init (&r_chain->mutex, NULL);
10c6c6: 5a pop %edx
10c6c7: 59 pop %ecx
10c6c8: 6a 00 push $0x0
10c6ca: 8d 47 1c lea 0x1c(%edi),%eax
10c6cd: 50 push %eax
10c6ce: e8 15 07 00 00 call 10cde8 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10c6d3: 5b pop %ebx
10c6d4: 58 pop %eax
10c6d5: 6a 00 push $0x0
10c6d7: 8d 47 20 lea 0x20(%edi),%eax
10c6da: 50 push %eax
10c6db: e8 70 03 00 00 call 10ca50 <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
10c6e0: 57 push %edi
10c6e1: 68 44 c2 10 00 push $0x10c244
10c6e6: 68 a8 aa 12 00 push $0x12aaa8
10c6eb: 8d 45 e4 lea -0x1c(%ebp),%eax
10c6ee: 50 push %eax
10c6ef: e8 34 0a 00 00 call 10d128 <pthread_create>
10c6f4: 89 c3 mov %eax,%ebx
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
10c6f6: 83 c4 20 add $0x20,%esp
10c6f9: 85 c0 test %eax,%eax
10c6fb: 0f 85 8e 00 00 00 jne 10c78f <rtems_aio_enqueue+0x1f7><== NEVER TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
++aio_request_queue.active_threads;
10c701: ff 05 04 ab 12 00 incl 0x12ab04
10c707: e9 55 ff ff ff jmp 10c661 <rtems_aio_enqueue+0xc9>
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
10c70c: 57 push %edi
10c70d: 6a 01 push $0x1
10c70f: 8b 43 14 mov 0x14(%ebx),%eax
10c712: ff 30 pushl (%eax)
10c714: 68 f4 aa 12 00 push $0x12aaf4
10c719: e8 2a fa ff ff call 10c148 <rtems_aio_search_fd>
10c71e: 89 c7 mov %eax,%edi
if (r_chain->new_fd == 1) {
10c720: 83 c4 10 add $0x10,%esp
10c723: 83 78 18 01 cmpl $0x1,0x18(%eax)
10c727: 74 33 je 10c75c <rtems_aio_enqueue+0x1c4>
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
pthread_cond_init (&r_chain->cond, NULL);
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
10c729: 83 ec 08 sub $0x8,%esp
10c72c: 53 push %ebx
10c72d: 83 c7 08 add $0x8,%edi
10c730: 57 push %edi
10c731: e8 5a fd ff ff call 10c490 <rtems_aio_insert_prio>
10c736: 83 c4 10 add $0x10,%esp
if (aio_request_queue.idle_threads > 0)
10c739: 8b 0d 08 ab 12 00 mov 0x12ab08,%ecx
10c73f: 85 c9 test %ecx,%ecx
10c741: 0f 8e 1a ff ff ff jle 10c661 <rtems_aio_enqueue+0xc9><== ALWAYS TAKEN
pthread_cond_signal (&aio_request_queue.new_req);
10c747: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c74a: 68 a4 aa 12 00 push $0x12aaa4 <== NOT EXECUTED
10c74f: e8 b0 03 00 00 call 10cb04 <pthread_cond_signal> <== NOT EXECUTED
10c754: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c757: e9 05 ff ff ff jmp 10c661 <rtems_aio_enqueue+0xc9><== NOT EXECUTED
10c75c: 83 ec 08 sub $0x8,%esp
10c75f: 53 push %ebx
10c760: 8d 40 08 lea 0x8(%eax),%eax
10c763: 50 push %eax
10c764: e8 cf 21 00 00 call 10e938 <_Chain_Insert>
if (r_chain->new_fd == 1) {
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
10c769: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
pthread_mutex_init (&r_chain->mutex, NULL);
10c770: 5a pop %edx
10c771: 59 pop %ecx
10c772: 6a 00 push $0x0
10c774: 8d 47 1c lea 0x1c(%edi),%eax
10c777: 50 push %eax
10c778: e8 6b 06 00 00 call 10cde8 <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
10c77d: 5b pop %ebx
10c77e: 58 pop %eax
10c77f: 6a 00 push $0x0
10c781: 83 c7 20 add $0x20,%edi
10c784: 57 push %edi
10c785: e8 c6 02 00 00 call 10ca50 <pthread_cond_init>
10c78a: 83 c4 10 add $0x10,%esp
10c78d: eb aa jmp 10c739 <rtems_aio_enqueue+0x1a1>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
pthread_mutex_unlock (&aio_request_queue.mutex);
10c78f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c792: 68 a0 aa 12 00 push $0x12aaa0 <== NOT EXECUTED
10c797: e8 20 08 00 00 call 10cfbc <pthread_mutex_unlock> <== NOT EXECUTED
return result;
10c79c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c79f: 89 de mov %ebx,%esi <== NOT EXECUTED
10c7a1: e9 cb fe ff ff jmp 10c671 <rtems_aio_enqueue+0xd9><== NOT EXECUTED
0010c244 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
10c244: 55 push %ebp
10c245: 89 e5 mov %esp,%ebp
10c247: 57 push %edi
10c248: 56 push %esi
10c249: 53 push %ebx
10c24a: 83 ec 4c sub $0x4c,%esp
rtems_aio_request_chain *r_chain = arg;
10c24d: 8b 7d 08 mov 0x8(%ebp),%edi
10c250: 8d 47 1c lea 0x1c(%edi),%eax
10c253: 89 45 b4 mov %eax,-0x4c(%ebp)
10c256: 66 90 xchg %ax,%ax
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
10c258: 83 ec 0c sub $0xc,%esp
10c25b: ff 75 b4 pushl -0x4c(%ebp)
10c25e: e8 d1 0c 00 00 call 10cf34 <pthread_mutex_lock>
if (result != 0)
10c263: 83 c4 10 add $0x10,%esp
10c266: 85 c0 test %eax,%eax
10c268: 0f 85 2a 01 00 00 jne 10c398 <rtems_aio_handle+0x154><== NEVER TAKEN
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c26e: 8b 5f 08 mov 0x8(%edi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10c271: 8d 47 0c lea 0xc(%edi),%eax
/* If the locked chain is not empty, take the first
request extract it, unlock the chain and process
the request, in this way the user can supply more
requests to this fd chain */
if (!rtems_chain_is_empty (chain)) {
10c274: 39 c3 cmp %eax,%ebx
10c276: 0f 84 d0 00 00 00 je 10c34c <rtems_aio_handle+0x108>
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
10c27c: e8 5f 15 00 00 call 10d7e0 <pthread_self>
10c281: 52 push %edx
10c282: 8d 55 c0 lea -0x40(%ebp),%edx
10c285: 52 push %edx
10c286: 8d 55 e4 lea -0x1c(%ebp),%edx
10c289: 52 push %edx
10c28a: 50 push %eax
10c28b: e8 20 11 00 00 call 10d3b0 <pthread_getschedparam>
param.sched_priority = req->priority;
10c290: 8b 43 0c mov 0xc(%ebx),%eax
10c293: 89 45 c0 mov %eax,-0x40(%ebp)
pthread_setschedparam (pthread_self(), req->policy, ¶m);
10c296: 8b 73 08 mov 0x8(%ebx),%esi
10c299: e8 42 15 00 00 call 10d7e0 <pthread_self>
10c29e: 83 c4 0c add $0xc,%esp
10c2a1: 8d 55 c0 lea -0x40(%ebp),%edx
10c2a4: 52 push %edx
10c2a5: 56 push %esi
10c2a6: 50 push %eax
10c2a7: e8 44 15 00 00 call 10d7f0 <pthread_setschedparam>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10c2ac: 89 1c 24 mov %ebx,(%esp)
10c2af: e8 48 26 00 00 call 10e8fc <_Chain_Extract>
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
10c2b4: 5e pop %esi
10c2b5: ff 75 b4 pushl -0x4c(%ebp)
10c2b8: e8 ff 0c 00 00 call 10cfbc <pthread_mutex_unlock>
switch (req->aiocbp->aio_lio_opcode) {
10c2bd: 8b 73 14 mov 0x14(%ebx),%esi
10c2c0: 83 c4 10 add $0x10,%esp
10c2c3: 8b 46 2c mov 0x2c(%esi),%eax
10c2c6: 83 f8 02 cmp $0x2,%eax
10c2c9: 74 21 je 10c2ec <rtems_aio_handle+0xa8>
10c2cb: 83 f8 03 cmp $0x3,%eax
10c2ce: 74 6c je 10c33c <rtems_aio_handle+0xf8> <== NEVER TAKEN
10c2d0: 48 dec %eax
10c2d1: 74 4d je 10c320 <rtems_aio_handle+0xdc> <== ALWAYS TAKEN
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
10c2d3: c7 46 34 ff ff ff ff movl $0xffffffff,0x34(%esi) <== NOT EXECUTED
req->aiocbp->error_code = errno;
10c2da: e8 1d 99 00 00 call 115bfc <__errno> <== NOT EXECUTED
10c2df: 8b 00 mov (%eax),%eax <== NOT EXECUTED
10c2e1: 89 46 30 mov %eax,0x30(%esi) <== NOT EXECUTED
10c2e4: e9 6f ff ff ff jmp 10c258 <rtems_aio_handle+0x14> <== NOT EXECUTED
10c2e9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
10c2ec: 83 ec 0c sub $0xc,%esp
10c2ef: ff 76 08 pushl 0x8(%esi)
10c2f2: ff 76 04 pushl 0x4(%esi)
10c2f5: ff 76 10 pushl 0x10(%esi)
10c2f8: ff 76 0c pushl 0xc(%esi)
10c2fb: ff 36 pushl (%esi)
10c2fd: e8 92 a3 00 00 call 116694 <pwrite>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
10c302: 83 c4 20 add $0x20,%esp
break;
default:
result = -1;
}
if (result == -1) {
10c305: 83 f8 ff cmp $0xffffffff,%eax
10c308: 0f 84 78 01 00 00 je 10c486 <rtems_aio_handle+0x242><== NEVER TAKEN
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
10c30e: 8b 53 14 mov 0x14(%ebx),%edx
10c311: 89 42 34 mov %eax,0x34(%edx)
req->aiocbp->error_code = 0;
10c314: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
10c31b: e9 38 ff ff ff jmp 10c258 <rtems_aio_handle+0x14>
pthread_mutex_unlock (&r_chain->mutex);
switch (req->aiocbp->aio_lio_opcode) {
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
10c320: 83 ec 0c sub $0xc,%esp
10c323: ff 76 08 pushl 0x8(%esi)
10c326: ff 76 04 pushl 0x4(%esi)
10c329: ff 76 10 pushl 0x10(%esi)
10c32c: ff 76 0c pushl 0xc(%esi)
10c32f: ff 36 pushl (%esi)
10c331: e8 aa a2 00 00 call 1165e0 <pread>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
10c336: 83 c4 20 add $0x20,%esp
10c339: eb ca jmp 10c305 <rtems_aio_handle+0xc1>
10c33b: 90 nop
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
10c33c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c33f: ff 36 pushl (%esi) <== NOT EXECUTED
10c341: e8 1e 67 00 00 call 112a64 <fsync> <== NOT EXECUTED
break;
10c346: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c349: eb ba jmp 10c305 <rtems_aio_handle+0xc1> <== NOT EXECUTED
10c34b: 90 nop <== NOT EXECUTED
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
10c34c: 83 ec 0c sub $0xc,%esp
10c34f: ff 75 b4 pushl -0x4c(%ebp)
10c352: e8 65 0c 00 00 call 10cfbc <pthread_mutex_unlock>
pthread_mutex_lock (&aio_request_queue.mutex);
10c357: c7 04 24 a0 aa 12 00 movl $0x12aaa0,(%esp)
10c35e: e8 d1 0b 00 00 call 10cf34 <pthread_mutex_lock>
if (rtems_chain_is_empty (chain))
10c363: 83 c4 10 add $0x10,%esp
10c366: 3b 5f 08 cmp 0x8(%edi),%ebx
10c369: 74 39 je 10c3a4 <rtems_aio_handle+0x160><== ALWAYS TAKEN
}
}
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
10c36b: 83 ec 0c sub $0xc,%esp
10c36e: 68 a0 aa 12 00 push $0x12aaa0
10c373: e8 44 0c 00 00 call 10cfbc <pthread_mutex_unlock>
10c378: 83 c4 10 add $0x10,%esp
10c37b: e9 d8 fe ff ff jmp 10c258 <rtems_aio_handle+0x14>
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
10c380: ff 0d 08 ab 12 00 decl 0x12ab08
pthread_mutex_unlock (&aio_request_queue.mutex);
10c386: 83 ec 0c sub $0xc,%esp
10c389: 68 a0 aa 12 00 push $0x12aaa0
10c38e: e8 29 0c 00 00 call 10cfbc <pthread_mutex_unlock>
return NULL;
10c393: 83 c4 10 add $0x10,%esp
10c396: 66 90 xchg %ax,%ax
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c398: 31 c0 xor %eax,%eax
10c39a: 8d 65 f4 lea -0xc(%ebp),%esp
10c39d: 5b pop %ebx
10c39e: 5e pop %esi
10c39f: 5f pop %edi
10c3a0: c9 leave
10c3a1: c3 ret
10c3a2: 66 90 xchg %ax,%ax
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
10c3a4: 83 ec 08 sub $0x8,%esp
10c3a7: 8d 45 dc lea -0x24(%ebp),%eax
10c3aa: 50 push %eax
10c3ab: 6a 01 push $0x1
10c3ad: e8 66 05 00 00 call 10c918 <clock_gettime>
timeout.tv_sec += 3;
10c3b2: 83 45 dc 03 addl $0x3,-0x24(%ebp)
timeout.tv_nsec = 0;
10c3b6: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
result = pthread_cond_timedwait (&r_chain->cond,
10c3bd: 8d 5f 20 lea 0x20(%edi),%ebx
10c3c0: 83 c4 0c add $0xc,%esp
10c3c3: 8d 55 dc lea -0x24(%ebp),%edx
10c3c6: 52 push %edx
10c3c7: 68 a0 aa 12 00 push $0x12aaa0
10c3cc: 53 push %ebx
10c3cd: e8 b6 07 00 00 call 10cb88 <pthread_cond_timedwait>
&aio_request_queue.mutex,
&timeout);
/* If no requests were added to the chain we delete the fd chain from
the queue and start working with idle fd chains */
if (result == ETIMEDOUT) {
10c3d2: 83 c4 10 add $0x10,%esp
10c3d5: 83 f8 74 cmp $0x74,%eax
10c3d8: 75 91 jne 10c36b <rtems_aio_handle+0x127><== NEVER TAKEN
10c3da: 83 ec 0c sub $0xc,%esp
10c3dd: 57 push %edi
10c3de: e8 19 25 00 00 call 10e8fc <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
10c3e3: 59 pop %ecx
10c3e4: ff 75 b4 pushl -0x4c(%ebp)
10c3e7: e8 dc 08 00 00 call 10ccc8 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->cond);
10c3ec: 89 1c 24 mov %ebx,(%esp)
10c3ef: e8 90 05 00 00 call 10c984 <pthread_cond_destroy>
free (r_chain);
10c3f4: 89 3c 24 mov %edi,(%esp)
10c3f7: e8 58 c7 ff ff call 108b54 <free>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c3fc: 8b 3d f4 aa 12 00 mov 0x12aaf4,%edi
pthread_cond_destroy (&r_chain->cond);
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
10c402: 83 c4 10 add $0x10,%esp
10c405: 81 ff f8 aa 12 00 cmp $0x12aaf8,%edi
10c40b: 74 2b je 10c438 <rtems_aio_handle+0x1f4>
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
10c40d: ff 0d 08 ab 12 00 decl 0x12ab08
++aio_request_queue.active_threads;
10c413: ff 05 04 ab 12 00 incl 0x12ab04
10c419: 83 ec 0c sub $0xc,%esp
10c41c: 57 push %edi
10c41d: e8 da 24 00 00 call 10e8fc <_Chain_Extract>
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = (rtems_aio_request_chain *) node;
rtems_aio_move_to_work (r_chain);
10c422: 89 3c 24 mov %edi,(%esp)
10c425: e8 de fd ff ff call 10c208 <rtems_aio_move_to_work>
10c42a: 83 c4 10 add $0x10,%esp
10c42d: 8d 47 1c lea 0x1c(%edi),%eax
10c430: 89 45 b4 mov %eax,-0x4c(%ebp)
10c433: e9 33 ff ff ff jmp 10c36b <rtems_aio_handle+0x127>
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
10c438: ff 05 08 ab 12 00 incl 0x12ab08
--aio_request_queue.active_threads;
10c43e: ff 0d 04 ab 12 00 decl 0x12ab04
clock_gettime (CLOCK_REALTIME, &timeout);
10c444: 52 push %edx
10c445: 52 push %edx
10c446: 8d 45 dc lea -0x24(%ebp),%eax
10c449: 50 push %eax
10c44a: 6a 01 push $0x1
10c44c: e8 c7 04 00 00 call 10c918 <clock_gettime>
timeout.tv_sec += 3;
10c451: 83 45 dc 03 addl $0x3,-0x24(%ebp)
timeout.tv_nsec = 0;
10c455: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
result = pthread_cond_timedwait (&aio_request_queue.new_req,
10c45c: 83 c4 0c add $0xc,%esp
10c45f: 8d 55 dc lea -0x24(%ebp),%edx
10c462: 52 push %edx
10c463: 68 a0 aa 12 00 push $0x12aaa0
10c468: 68 a4 aa 12 00 push $0x12aaa4
10c46d: e8 16 07 00 00 call 10cb88 <pthread_cond_timedwait>
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
10c472: 83 c4 10 add $0x10,%esp
10c475: 83 f8 74 cmp $0x74,%eax
10c478: 0f 84 02 ff ff ff je 10c380 <rtems_aio_handle+0x13c><== ALWAYS TAKEN
10c47e: 8b 3d f4 aa 12 00 mov 0x12aaf4,%edi <== NOT EXECUTED
10c484: eb 87 jmp 10c40d <rtems_aio_handle+0x1c9><== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
10c486: 8b 73 14 mov 0x14(%ebx),%esi <== NOT EXECUTED
10c489: e9 45 fe ff ff jmp 10c2d3 <rtems_aio_handle+0x8f> <== NOT EXECUTED
0010c020 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
10c020: 55 push %ebp
10c021: 89 e5 mov %esp,%ebp
10c023: 53 push %ebx
10c024: 83 ec 10 sub $0x10,%esp
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
10c027: 68 a8 aa 12 00 push $0x12aaa8
10c02c: e8 a3 10 00 00 call 10d0d4 <pthread_attr_init>
10c031: 89 c3 mov %eax,%ebx
if (result != 0)
10c033: 83 c4 10 add $0x10,%esp
10c036: 85 c0 test %eax,%eax
10c038: 74 0a je 10c044 <rtems_aio_init+0x24> <== ALWAYS TAKEN
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
return result;
}
10c03a: 89 d8 mov %ebx,%eax <== NOT EXECUTED
10c03c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10c03f: c9 leave <== NOT EXECUTED
10c040: c3 ret <== NOT EXECUTED
10c041: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
result = pthread_attr_init (&aio_request_queue.attr);
if (result != 0)
return result;
result =
10c044: 83 ec 08 sub $0x8,%esp
10c047: 6a 00 push $0x0
10c049: 68 a8 aa 12 00 push $0x12aaa8
10c04e: e8 ad 10 00 00 call 10d100 <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
10c053: 83 c4 10 add $0x10,%esp
10c056: 85 c0 test %eax,%eax
10c058: 0f 85 96 00 00 00 jne 10c0f4 <rtems_aio_init+0xd4> <== NEVER TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
10c05e: 83 ec 08 sub $0x8,%esp
10c061: 6a 00 push $0x0
10c063: 68 a0 aa 12 00 push $0x12aaa0
10c068: e8 7b 0d 00 00 call 10cde8 <pthread_mutex_init>
if (result != 0)
10c06d: 83 c4 10 add $0x10,%esp
10c070: 85 c0 test %eax,%eax
10c072: 0f 85 b8 00 00 00 jne 10c130 <rtems_aio_init+0x110> <== NEVER TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
10c078: 83 ec 08 sub $0x8,%esp
10c07b: 6a 00 push $0x0
10c07d: 68 a4 aa 12 00 push $0x12aaa4
10c082: e8 c9 09 00 00 call 10ca50 <pthread_cond_init>
10c087: 89 c3 mov %eax,%ebx
if (result != 0) {
10c089: 83 c4 10 add $0x10,%esp
10c08c: 85 c0 test %eax,%eax
10c08e: 75 7c jne 10c10c <rtems_aio_init+0xec> <== NEVER TAKEN
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10c090: c7 05 e8 aa 12 00 ec movl $0x12aaec,0x12aae8
10c097: aa 12 00
head->previous = NULL;
10c09a: c7 05 ec aa 12 00 00 movl $0x0,0x12aaec
10c0a1: 00 00 00
tail->previous = head;
10c0a4: c7 05 f0 aa 12 00 e8 movl $0x12aae8,0x12aaf0
10c0ab: aa 12 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
10c0ae: c7 05 f4 aa 12 00 f8 movl $0x12aaf8,0x12aaf4
10c0b5: aa 12 00
head->previous = NULL;
10c0b8: c7 05 f8 aa 12 00 00 movl $0x0,0x12aaf8
10c0bf: 00 00 00
tail->previous = head;
10c0c2: c7 05 fc aa 12 00 f4 movl $0x12aaf4,0x12aafc
10c0c9: aa 12 00
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
10c0cc: c7 05 04 ab 12 00 00 movl $0x0,0x12ab04
10c0d3: 00 00 00
aio_request_queue.idle_threads = 0;
10c0d6: c7 05 08 ab 12 00 00 movl $0x0,0x12ab08
10c0dd: 00 00 00
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
10c0e0: c7 05 00 ab 12 00 0b movl $0xb00b,0x12ab00
10c0e7: b0 00 00
return result;
}
10c0ea: 89 d8 mov %ebx,%eax
10c0ec: 8b 5d fc mov -0x4(%ebp),%ebx
10c0ef: c9 leave
10c0f0: c3 ret
10c0f1: 8d 76 00 lea 0x0(%esi),%esi
result =
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
10c0f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c0f7: 68 a8 aa 12 00 push $0x12aaa8 <== NOT EXECUTED
10c0fc: e8 af 0f 00 00 call 10d0b0 <pthread_attr_destroy> <== NOT EXECUTED
10c101: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c104: e9 55 ff ff ff jmp 10c05e <rtems_aio_init+0x3e> <== NOT EXECUTED
10c109: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
if (result != 0) {
pthread_mutex_destroy (&aio_request_queue.mutex);
10c10c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c10f: 68 a0 aa 12 00 push $0x12aaa0 <== NOT EXECUTED
10c114: e8 af 0b 00 00 call 10ccc8 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
10c119: c7 04 24 a8 aa 12 00 movl $0x12aaa8,(%esp) <== NOT EXECUTED
10c120: e8 8b 0f 00 00 call 10d0b0 <pthread_attr_destroy> <== NOT EXECUTED
10c125: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c128: e9 63 ff ff ff jmp 10c090 <rtems_aio_init+0x70> <== NOT EXECUTED
10c12d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
10c130: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10c133: 68 a8 aa 12 00 push $0x12aaa8 <== NOT EXECUTED
10c138: e8 73 0f 00 00 call 10d0b0 <pthread_attr_destroy> <== NOT EXECUTED
10c13d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10c140: e9 33 ff ff ff jmp 10c078 <rtems_aio_init+0x58> <== NOT EXECUTED
0010c490 <rtems_aio_insert_prio>:
* NONE
*/
void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
10c490: 55 push %ebp
10c491: 89 e5 mov %esp,%ebp
10c493: 56 push %esi
10c494: 53 push %ebx
10c495: 8b 55 08 mov 0x8(%ebp),%edx
10c498: 8b 75 0c mov 0xc(%ebp),%esi
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c49b: 8b 02 mov (%edx),%eax
10c49d: 8d 4a 04 lea 0x4(%edx),%ecx
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
10c4a0: 39 c8 cmp %ecx,%eax
10c4a2: 74 27 je 10c4cb <rtems_aio_insert_prio+0x3b><== NEVER TAKEN
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
10c4a4: 8b 56 14 mov 0x14(%esi),%edx
10c4a7: 8b 5a 14 mov 0x14(%edx),%ebx
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
10c4aa: 8b 50 14 mov 0x14(%eax),%edx
while (req->aiocbp->aio_reqprio > prio &&
10c4ad: 39 5a 14 cmp %ebx,0x14(%edx)
10c4b0: 7c 06 jl 10c4b8 <rtems_aio_insert_prio+0x28><== NEVER TAKEN
10c4b2: eb 0e jmp 10c4c2 <rtems_aio_insert_prio+0x32>
10c4b4: 39 c8 cmp %ecx,%eax <== NOT EXECUTED
10c4b6: 74 1c je 10c4d4 <rtems_aio_insert_prio+0x44><== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c4b8: 8b 00 mov (%eax),%eax <== NOT EXECUTED
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
10c4ba: 8b 50 14 mov 0x14(%eax),%edx <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
10c4bd: 39 5a 14 cmp %ebx,0x14(%edx) <== NOT EXECUTED
10c4c0: 7c f2 jl 10c4b4 <rtems_aio_insert_prio+0x24><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
10c4c2: 89 75 0c mov %esi,0xc(%ebp)
10c4c5: 8b 40 04 mov 0x4(%eax),%eax
10c4c8: 89 45 08 mov %eax,0x8(%ebp)
}
rtems_chain_insert (node->previous, &req->next_prio);
}
}
10c4cb: 5b pop %ebx
10c4cc: 5e pop %esi
10c4cd: c9 leave
10c4ce: e9 65 24 00 00 jmp 10e938 <_Chain_Insert>
10c4d3: 90 nop
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c4d4: 89 c8 mov %ecx,%eax <== NOT EXECUTED
10c4d6: eb ea jmp 10c4c2 <rtems_aio_insert_prio+0x32><== NOT EXECUTED
0010c208 <rtems_aio_move_to_work>:
* NONE
*/
void
rtems_aio_move_to_work (rtems_aio_request_chain *r_chain)
{
10c208: 55 push %ebp
10c209: 89 e5 mov %esp,%ebp
10c20b: 83 ec 08 sub $0x8,%esp
10c20e: 8b 4d 08 mov 0x8(%ebp),%ecx
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c211: a1 e8 aa 12 00 mov 0x12aae8,%eax
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
10c216: 8b 51 14 mov 0x14(%ecx),%edx
10c219: 39 50 14 cmp %edx,0x14(%eax)
10c21c: 7c 09 jl 10c227 <rtems_aio_move_to_work+0x1f><== ALWAYS TAKEN
10c21e: eb 13 jmp 10c233 <rtems_aio_move_to_work+0x2b><== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c220: 8b 00 mov (%eax),%eax
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
10c222: 39 50 14 cmp %edx,0x14(%eax)
10c225: 7d 0c jge 10c233 <rtems_aio_move_to_work+0x2b>
10c227: 3d ec aa 12 00 cmp $0x12aaec,%eax
10c22c: 75 f2 jne 10c220 <rtems_aio_move_to_work+0x18><== ALWAYS TAKEN
10c22e: b8 ec aa 12 00 mov $0x12aaec,%eax <== NOT EXECUTED
10c233: 83 ec 08 sub $0x8,%esp
10c236: 51 push %ecx
10c237: ff 70 04 pushl 0x4(%eax)
10c23a: e8 f9 26 00 00 call 10e938 <_Chain_Insert>
10c23f: 83 c4 10 add $0x10,%esp
node = rtems_chain_next (node);
temp = (rtems_aio_request_chain *) node;
}
rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd);
}
10c242: c9 leave
10c243: c3 ret
0010c4d8 <rtems_aio_remove_fd>:
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
10c4d8: 55 push %ebp
10c4d9: 89 e5 mov %esp,%ebp
10c4db: 57 push %edi
10c4dc: 56 push %esi
10c4dd: 53 push %ebx
10c4de: 83 ec 0c sub $0xc,%esp
10c4e1: 8b 7d 08 mov 0x8(%ebp),%edi
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c4e4: 8b 5f 08 mov 0x8(%edi),%ebx
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
10c4e7: 83 c7 0c add $0xc,%edi
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
10c4ea: 39 fb cmp %edi,%ebx
10c4ec: 75 04 jne 10c4f2 <rtems_aio_remove_fd+0x1a><== ALWAYS TAKEN
10c4ee: eb 2d jmp 10c51d <rtems_aio_remove_fd+0x45><== NOT EXECUTED
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
10c4f0: 89 f3 mov %esi,%ebx
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10c4f2: 83 ec 0c sub $0xc,%esp
10c4f5: 53 push %ebx
10c4f6: e8 01 24 00 00 call 10e8fc <_Chain_Extract>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c4fb: 8b 33 mov (%ebx),%esi
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
10c4fd: 8b 43 14 mov 0x14(%ebx),%eax
10c500: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax)
req->aiocbp->return_value = -1;
10c507: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax)
free (req);
10c50e: 89 1c 24 mov %ebx,(%esp)
10c511: e8 3e c6 ff ff call 108b54 <free>
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
10c516: 83 c4 10 add $0x10,%esp
10c519: 39 fe cmp %edi,%esi
10c51b: 75 d3 jne 10c4f0 <rtems_aio_remove_fd+0x18>
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
req->aiocbp->return_value = -1;
free (req);
}
}
10c51d: 8d 65 f4 lea -0xc(%ebp),%esp
10c520: 5b pop %ebx
10c521: 5e pop %esi
10c522: 5f pop %edi
10c523: c9 leave
10c524: c3 ret
0010c528 <rtems_aio_remove_req>:
* AIO_NOTCANCELED - if request was not canceled
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
10c528: 55 push %ebp
10c529: 89 e5 mov %esp,%ebp
10c52b: 53 push %ebx
10c52c: 83 ec 04 sub $0x4,%esp
10c52f: 8b 55 08 mov 0x8(%ebp),%edx
10c532: 8b 4d 0c mov 0xc(%ebp),%ecx
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c535: 8b 02 mov (%edx),%eax
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10c537: 83 c2 04 add $0x4,%edx
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
10c53a: 39 d0 cmp %edx,%eax
10c53c: 74 4e je 10c58c <rtems_aio_remove_req+0x64>
return AIO_ALLDONE;
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
10c53e: 89 c3 mov %eax,%ebx
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
10c540: 39 48 14 cmp %ecx,0x14(%eax)
10c543: 75 0a jne 10c54f <rtems_aio_remove_req+0x27><== NEVER TAKEN
10c545: eb 19 jmp 10c560 <rtems_aio_remove_req+0x38>
10c547: 90 nop
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
10c548: 89 c3 mov %eax,%ebx <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
10c54a: 39 48 14 cmp %ecx,0x14(%eax) <== NOT EXECUTED
10c54d: 74 11 je 10c560 <rtems_aio_remove_req+0x38><== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c54f: 8b 00 mov (%eax),%eax <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
10c551: 39 d0 cmp %edx,%eax <== NOT EXECUTED
10c553: 75 f3 jne 10c548 <rtems_aio_remove_req+0x20><== NOT EXECUTED
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
10c555: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
10c55a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10c55d: c9 leave <== NOT EXECUTED
10c55e: c3 ret <== NOT EXECUTED
10c55f: 90 nop <== NOT EXECUTED
10c560: 83 ec 0c sub $0xc,%esp
10c563: 50 push %eax
10c564: e8 93 23 00 00 call 10e8fc <_Chain_Extract>
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
10c569: 8b 43 14 mov 0x14(%ebx),%eax
10c56c: c7 40 30 8c 00 00 00 movl $0x8c,0x30(%eax)
current->aiocbp->return_value = -1;
10c573: c7 40 34 ff ff ff ff movl $0xffffffff,0x34(%eax)
free (current);
10c57a: 89 1c 24 mov %ebx,(%esp)
10c57d: e8 d2 c5 ff ff call 108b54 <free>
}
return AIO_CANCELED;
10c582: 83 c4 10 add $0x10,%esp
10c585: 31 c0 xor %eax,%eax
}
10c587: 8b 5d fc mov -0x4(%ebp),%ebx
10c58a: c9 leave
10c58b: c3 ret
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
return AIO_ALLDONE;
10c58c: b8 02 00 00 00 mov $0x2,%eax
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
10c591: 8b 5d fc mov -0x4(%ebp),%ebx
10c594: c9 leave
10c595: c3 ret
0010c148 <rtems_aio_search_fd>:
*
*/
rtems_aio_request_chain *
rtems_aio_search_fd (rtems_chain_control *chain, int fildes, int create)
{
10c148: 55 push %ebp
10c149: 89 e5 mov %esp,%ebp
10c14b: 57 push %edi
10c14c: 56 push %esi
10c14d: 53 push %ebx
10c14e: 83 ec 1c sub $0x1c,%esp
10c151: 8b 75 08 mov 0x8(%ebp),%esi
10c154: 8b 5d 0c mov 0xc(%ebp),%ebx
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c157: 8b 06 mov (%esi),%eax
rtems_chain_node *node;
node = rtems_chain_first (chain);
r_chain = (rtems_aio_request_chain *) node;
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
10c159: 8b 50 14 mov 0x14(%eax),%edx
10c15c: 39 d3 cmp %edx,%ebx
10c15e: 7e 28 jle 10c188 <rtems_aio_search_fd+0x40>
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
10c160: 8d 4e 04 lea 0x4(%esi),%ecx
10c163: eb 0c jmp 10c171 <rtems_aio_search_fd+0x29>
10c165: 8d 76 00 lea 0x0(%esi),%esi
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c168: 8b 00 mov (%eax),%eax
rtems_chain_node *node;
node = rtems_chain_first (chain);
r_chain = (rtems_aio_request_chain *) node;
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
10c16a: 8b 50 14 mov 0x14(%eax),%edx
10c16d: 39 da cmp %ebx,%edx
10c16f: 7d 17 jge 10c188 <rtems_aio_search_fd+0x40>
10c171: 39 c8 cmp %ecx,%eax
10c173: 75 f3 jne 10c168 <rtems_aio_search_fd+0x20>
10c175: 89 c7 mov %eax,%edi
}
if (r_chain->fildes == fildes)
r_chain->new_fd = 0;
else {
if (create == 0)
10c177: 8b 45 10 mov 0x10(%ebp),%eax
10c17a: 85 c0 test %eax,%eax
10c17c: 75 1f jne 10c19d <rtems_aio_search_fd+0x55>
r_chain = NULL;
10c17e: 31 c0 xor %eax,%eax
r_chain->new_fd = 1;
r_chain->fildes = fildes;
}
}
return r_chain;
}
10c180: 8d 65 f4 lea -0xc(%ebp),%esp
10c183: 5b pop %ebx
10c184: 5e pop %esi
10c185: 5f pop %edi
10c186: c9 leave
10c187: c3 ret
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
10c188: 89 c7 mov %eax,%edi
while (r_chain->fildes < fildes && !rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
r_chain = (rtems_aio_request_chain *) node;
}
if (r_chain->fildes == fildes)
10c18a: 39 d3 cmp %edx,%ebx
10c18c: 75 e9 jne 10c177 <rtems_aio_search_fd+0x2f>
r_chain->new_fd = 0;
10c18e: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
r_chain->new_fd = 1;
r_chain->fildes = fildes;
}
}
return r_chain;
}
10c195: 8d 65 f4 lea -0xc(%ebp),%esp
10c198: 5b pop %ebx
10c199: 5e pop %esi
10c19a: 5f pop %edi
10c19b: c9 leave
10c19c: c3 ret
r_chain->new_fd = 0;
else {
if (create == 0)
r_chain = NULL;
else {
r_chain = malloc (sizeof (rtems_aio_request_chain));
10c19d: 83 ec 0c sub $0xc,%esp
10c1a0: 6a 24 push $0x24
10c1a2: e8 c1 ce ff ff call 109068 <malloc>
10c1a7: 89 c2 mov %eax,%edx
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
10c1a9: 8d 4a 0c lea 0xc(%edx),%ecx
10c1ac: 89 4a 08 mov %ecx,0x8(%edx)
head->next = tail;
head->previous = NULL;
10c1af: c7 42 0c 00 00 00 00 movl $0x0,0xc(%edx)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
10c1b6: 8d 4a 08 lea 0x8(%edx),%ecx
10c1b9: 89 4a 10 mov %ecx,0x10(%edx)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
10c1bc: 8d 4e 04 lea 0x4(%esi),%ecx
rtems_chain_initialize_empty (&r_chain->perfd);
if (rtems_chain_is_empty (chain))
10c1bf: 83 c4 10 add $0x10,%esp
10c1c2: 39 0e cmp %ecx,(%esi)
10c1c4: 74 27 je 10c1ed <rtems_aio_search_fd+0xa5>
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
10c1c6: 83 ec 08 sub $0x8,%esp
10c1c9: 52 push %edx
10c1ca: ff 77 04 pushl 0x4(%edi)
10c1cd: 89 45 e4 mov %eax,-0x1c(%ebp)
10c1d0: 89 55 e0 mov %edx,-0x20(%ebp)
10c1d3: e8 60 27 00 00 call 10e938 <_Chain_Insert>
10c1d8: 83 c4 10 add $0x10,%esp
10c1db: 8b 55 e0 mov -0x20(%ebp),%edx
10c1de: 8b 45 e4 mov -0x1c(%ebp),%eax
rtems_chain_prepend (chain, &r_chain->next_fd);
else
rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd);
r_chain->new_fd = 1;
10c1e1: c7 42 18 01 00 00 00 movl $0x1,0x18(%edx)
r_chain->fildes = fildes;
10c1e8: 89 5a 14 mov %ebx,0x14(%edx)
10c1eb: eb a8 jmp 10c195 <rtems_aio_search_fd+0x4d>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
10c1ed: 83 ec 08 sub $0x8,%esp
10c1f0: 52 push %edx
10c1f1: 56 push %esi
10c1f2: 89 45 e4 mov %eax,-0x1c(%ebp)
10c1f5: 89 55 e0 mov %edx,-0x20(%ebp)
10c1f8: e8 3b 27 00 00 call 10e938 <_Chain_Insert>
10c1fd: 83 c4 10 add $0x10,%esp
10c200: 8b 45 e4 mov -0x1c(%ebp),%eax
10c203: 8b 55 e0 mov -0x20(%ebp),%edx
10c206: eb d9 jmp 10c1e1 <rtems_aio_search_fd+0x99>
0010880c <rtems_assoc_local_by_name>:
uint32_t rtems_assoc_local_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
10880c: 55 push %ebp
10880d: 89 e5 mov %esp,%ebp
10880f: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_name(ap, name);
108812: ff 75 0c pushl 0xc(%ebp)
108815: ff 75 08 pushl 0x8(%ebp)
108818: e8 13 02 00 00 call 108a30 <rtems_assoc_ptr_by_name>
if (nap)
10881d: 83 c4 10 add $0x10,%esp
108820: 85 c0 test %eax,%eax
108822: 74 08 je 10882c <rtems_assoc_local_by_name+0x20>
return nap->local_value;
108824: 8b 40 04 mov 0x4(%eax),%eax
return 0;
}
108827: c9 leave
108828: c3 ret
108829: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_name(ap, name);
if (nap)
return nap->local_value;
return 0;
10882c: 31 c0 xor %eax,%eax
}
10882e: c9 leave
10882f: c3 ret
0010fc20 <rtems_assoc_local_by_remote>:
uint32_t rtems_assoc_local_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
10fc20: 55 push %ebp
10fc21: 89 e5 mov %esp,%ebp
10fc23: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
10fc26: ff 75 0c pushl 0xc(%ebp)
10fc29: ff 75 08 pushl 0x8(%ebp)
10fc2c: e8 13 00 00 00 call 10fc44 <rtems_assoc_ptr_by_remote>
if (nap)
10fc31: 83 c4 10 add $0x10,%esp
10fc34: 85 c0 test %eax,%eax
10fc36: 74 08 je 10fc40 <rtems_assoc_local_by_remote+0x20>
return nap->local_value;
10fc38: 8b 40 04 mov 0x4(%eax),%eax
return 0;
}
10fc3b: c9 leave
10fc3c: c3 ret
10fc3d: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
if (nap)
return nap->local_value;
return 0;
10fc40: 31 c0 xor %eax,%eax
}
10fc42: c9 leave
10fc43: c3 ret
00112ad0 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
112ad0: 55 push %ebp
112ad1: 89 e5 mov %esp,%ebp
112ad3: 57 push %edi
112ad4: 56 push %esi
112ad5: 53 push %ebx
112ad6: 83 ec 1c sub $0x1c,%esp
112ad9: 8b 7d 0c mov 0xc(%ebp),%edi
112adc: be 20 00 00 00 mov $0x20,%esi
uint32_t b;
uint32_t local_value = 0;
112ae1: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
for (b = 1; b; b <<= 1) {
112ae8: bb 01 00 00 00 mov $0x1,%ebx
112aed: eb 06 jmp 112af5 <rtems_assoc_local_by_remote_bitfield+0x25>
112aef: 90 nop
112af0: d1 e3 shl %ebx
112af2: 4e dec %esi
112af3: 74 1b je 112b10 <rtems_assoc_local_by_remote_bitfield+0x40>
if (b & remote_value)
112af5: 85 fb test %edi,%ebx
112af7: 74 f7 je 112af0 <rtems_assoc_local_by_remote_bitfield+0x20>
local_value |= rtems_assoc_local_by_remote(ap, b);
112af9: 83 ec 08 sub $0x8,%esp
112afc: 53 push %ebx
112afd: ff 75 08 pushl 0x8(%ebp)
112b00: e8 1b d1 ff ff call 10fc20 <rtems_assoc_local_by_remote>
112b05: 09 45 e4 or %eax,-0x1c(%ebp)
112b08: 83 c4 10 add $0x10,%esp
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
112b0b: d1 e3 shl %ebx
112b0d: 4e dec %esi
112b0e: 75 e5 jne 112af5 <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;
}
112b10: 8b 45 e4 mov -0x1c(%ebp),%eax
112b13: 8d 65 f4 lea -0xc(%ebp),%esp
112b16: 5b pop %ebx
112b17: 5e pop %esi
112b18: 5f pop %edi
112b19: c9 leave
112b1a: c3 ret
00114d64 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
114d64: 55 push %ebp
114d65: 89 e5 mov %esp,%ebp
114d67: 53 push %ebx
114d68: 83 ec 0c sub $0xc,%esp
114d6b: 8b 5d 0c mov 0xc(%ebp),%ebx
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
114d6e: 53 push %ebx
114d6f: ff 75 08 pushl 0x8(%ebp)
114d72: e8 1d 00 00 00 call 114d94 <rtems_assoc_ptr_by_local>
if (nap)
114d77: 83 c4 10 add $0x10,%esp
114d7a: 85 c0 test %eax,%eax
114d7c: 74 0a je 114d88 <rtems_assoc_name_by_local+0x24>
return nap->name;
114d7e: 8b 00 mov (%eax),%eax
return rtems_assoc_name_bad(local_value);
}
114d80: 8b 5d fc mov -0x4(%ebp),%ebx
114d83: c9 leave
114d84: c3 ret
114d85: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
114d88: 89 5d 08 mov %ebx,0x8(%ebp)
}
114d8b: 8b 5d fc mov -0x4(%ebp),%ebx
114d8e: c9 leave
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
114d8f: e9 8c 30 00 00 jmp 117e20 <rtems_assoc_name_bad>
001089a8 <rtems_assoc_name_by_remote>:
const char *rtems_assoc_name_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
1089a8: 55 push %ebp
1089a9: 89 e5 mov %esp,%ebp
1089ab: 53 push %ebx
1089ac: 83 ec 0c sub $0xc,%esp
1089af: 8b 5d 0c mov 0xc(%ebp),%ebx
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
1089b2: 53 push %ebx
1089b3: ff 75 08 pushl 0x8(%ebp)
1089b6: e8 ed 00 00 00 call 108aa8 <rtems_assoc_ptr_by_remote>
if (nap)
1089bb: 83 c4 10 add $0x10,%esp
1089be: 85 c0 test %eax,%eax
1089c0: 74 0a je 1089cc <rtems_assoc_name_by_remote+0x24>
return nap->name;
1089c2: 8b 00 mov (%eax),%eax
return rtems_assoc_name_bad(remote_value);
}
1089c4: 8b 5d fc mov -0x4(%ebp),%ebx
1089c7: c9 leave
1089c8: c3 ret
1089c9: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(remote_value);
1089cc: 89 5d 08 mov %ebx,0x8(%ebp)
}
1089cf: 8b 5d fc mov -0x4(%ebp),%ebx
1089d2: c9 leave
nap = rtems_assoc_ptr_by_remote(ap, remote_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(remote_value);
1089d3: e9 38 7f 00 00 jmp 110910 <rtems_assoc_name_bad>
00114d94 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
114d94: 55 push %ebp
114d95: 89 e5 mov %esp,%ebp
114d97: 57 push %edi
114d98: 56 push %esi
114d99: 53 push %ebx
114d9a: 8b 45 08 mov 0x8(%ebp),%eax
114d9d: 8b 55 0c mov 0xc(%ebp),%edx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
114da0: 8b 30 mov (%eax),%esi
114da2: 85 f6 test %esi,%esi
114da4: 74 3e je 114de4 <rtems_assoc_ptr_by_local+0x50>
114da6: bf 78 7d 12 00 mov $0x127d78,%edi
114dab: b9 0a 00 00 00 mov $0xa,%ecx
114db0: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
114db2: 74 18 je 114dcc <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;
114db4: 31 c9 xor %ecx,%ecx
114db6: eb 09 jmp 114dc1 <rtems_assoc_ptr_by_local+0x2d>
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
114db8: 83 c0 0c add $0xc,%eax
114dbb: 8b 18 mov (%eax),%ebx
114dbd: 85 db test %ebx,%ebx
114dbf: 74 1b je 114ddc <rtems_assoc_ptr_by_local+0x48>
if (ap->local_value == local_value)
114dc1: 39 50 04 cmp %edx,0x4(%eax)
114dc4: 75 f2 jne 114db8 <rtems_assoc_ptr_by_local+0x24>
return ap;
return default_ap;
}
114dc6: 5b pop %ebx
114dc7: 5e pop %esi
114dc8: 5f pop %edi
114dc9: c9 leave
114dca: c3 ret
114dcb: 90 nop
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
114dcc: 8d 58 0c lea 0xc(%eax),%ebx
for ( ; ap->name; ap++)
114dcf: 8b 70 0c mov 0xc(%eax),%esi
114dd2: 85 f6 test %esi,%esi
114dd4: 74 f0 je 114dc6 <rtems_assoc_ptr_by_local+0x32><== NEVER TAKEN
114dd6: 89 c1 mov %eax,%ecx
114dd8: 89 d8 mov %ebx,%eax
114dda: eb e5 jmp 114dc1 <rtems_assoc_ptr_by_local+0x2d>
114ddc: 89 c8 mov %ecx,%eax
if (ap->local_value == local_value)
return ap;
return default_ap;
}
114dde: 5b pop %ebx
114ddf: 5e pop %esi
114de0: 5f pop %edi
114de1: c9 leave
114de2: c3 ret
114de3: 90 nop
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;
114de4: 31 c0 xor %eax,%eax
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
114de6: 5b pop %ebx
114de7: 5e pop %esi
114de8: 5f pop %edi
114de9: c9 leave
114dea: c3 ret
00108a30 <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
108a30: 55 push %ebp
108a31: 89 e5 mov %esp,%ebp
108a33: 57 push %edi
108a34: 56 push %esi
108a35: 53 push %ebx
108a36: 83 ec 0c sub $0xc,%esp
108a39: 8b 5d 08 mov 0x8(%ebp),%ebx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
108a3c: 8b 03 mov (%ebx),%eax
108a3e: 85 c0 test %eax,%eax
108a40: 74 5a je 108a9c <rtems_assoc_ptr_by_name+0x6c>
108a42: bf fd 0b 12 00 mov $0x120bfd,%edi
108a47: b9 0a 00 00 00 mov $0xa,%ecx
108a4c: 89 c6 mov %eax,%esi
108a4e: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
108a50: 74 2e je 108a80 <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;
108a52: 31 f6 xor %esi,%esi
108a54: eb 0b jmp 108a61 <rtems_assoc_ptr_by_name+0x31>
108a56: 66 90 xchg %ax,%ax
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
108a58: 83 c3 0c add $0xc,%ebx
108a5b: 8b 03 mov (%ebx),%eax
108a5d: 85 c0 test %eax,%eax
108a5f: 74 2f je 108a90 <rtems_assoc_ptr_by_name+0x60>
if (strcmp(ap->name, name) == 0)
108a61: 83 ec 08 sub $0x8,%esp
108a64: ff 75 0c pushl 0xc(%ebp)
108a67: 50 push %eax
108a68: e8 df c0 00 00 call 114b4c <strcmp>
108a6d: 83 c4 10 add $0x10,%esp
108a70: 85 c0 test %eax,%eax
108a72: 75 e4 jne 108a58 <rtems_assoc_ptr_by_name+0x28>
return ap;
return default_ap;
}
108a74: 89 d8 mov %ebx,%eax
108a76: 8d 65 f4 lea -0xc(%ebp),%esp
108a79: 5b pop %ebx
108a7a: 5e pop %esi
108a7b: 5f pop %edi
108a7c: c9 leave
108a7d: c3 ret
108a7e: 66 90 xchg %ax,%ax
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
108a80: 8d 53 0c lea 0xc(%ebx),%edx
for ( ; ap->name; ap++)
108a83: 8b 43 0c mov 0xc(%ebx),%eax
108a86: 85 c0 test %eax,%eax
108a88: 74 ea je 108a74 <rtems_assoc_ptr_by_name+0x44><== NEVER TAKEN
108a8a: 89 de mov %ebx,%esi
108a8c: 89 d3 mov %edx,%ebx
108a8e: eb d1 jmp 108a61 <rtems_assoc_ptr_by_name+0x31>
108a90: 89 f3 mov %esi,%ebx
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
108a92: 89 d8 mov %ebx,%eax
108a94: 8d 65 f4 lea -0xc(%ebp),%esp
108a97: 5b pop %ebx
108a98: 5e pop %esi
108a99: 5f pop %edi
108a9a: c9 leave
108a9b: 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;
108a9c: 31 db xor %ebx,%ebx
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
108a9e: 89 d8 mov %ebx,%eax
108aa0: 8d 65 f4 lea -0xc(%ebp),%esp
108aa3: 5b pop %ebx
108aa4: 5e pop %esi
108aa5: 5f pop %edi
108aa6: c9 leave
108aa7: c3 ret
0010fc44 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
10fc44: 55 push %ebp
10fc45: 89 e5 mov %esp,%ebp
10fc47: 57 push %edi
10fc48: 56 push %esi
10fc49: 53 push %ebx
10fc4a: 8b 45 08 mov 0x8(%ebp),%eax
10fc4d: 8b 55 0c mov 0xc(%ebp),%edx
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
10fc50: 8b 30 mov (%eax),%esi
10fc52: 85 f6 test %esi,%esi
10fc54: 74 3e je 10fc94 <rtems_assoc_ptr_by_remote+0x50>
10fc56: bf d8 19 12 00 mov $0x1219d8,%edi
10fc5b: b9 0a 00 00 00 mov $0xa,%ecx
10fc60: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10fc62: 74 18 je 10fc7c <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;
10fc64: 31 c9 xor %ecx,%ecx
10fc66: eb 09 jmp 10fc71 <rtems_assoc_ptr_by_remote+0x2d>
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
10fc68: 83 c0 0c add $0xc,%eax
10fc6b: 8b 18 mov (%eax),%ebx
10fc6d: 85 db test %ebx,%ebx
10fc6f: 74 1b je 10fc8c <rtems_assoc_ptr_by_remote+0x48>
if (ap->remote_value == remote_value)
10fc71: 39 50 08 cmp %edx,0x8(%eax)
10fc74: 75 f2 jne 10fc68 <rtems_assoc_ptr_by_remote+0x24>
return ap;
return default_ap;
}
10fc76: 5b pop %ebx
10fc77: 5e pop %esi
10fc78: 5f pop %edi
10fc79: c9 leave
10fc7a: c3 ret
10fc7b: 90 nop
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
10fc7c: 8d 58 0c lea 0xc(%eax),%ebx
for ( ; ap->name; ap++)
10fc7f: 8b 70 0c mov 0xc(%eax),%esi
10fc82: 85 f6 test %esi,%esi
10fc84: 74 f0 je 10fc76 <rtems_assoc_ptr_by_remote+0x32><== NEVER TAKEN
10fc86: 89 c1 mov %eax,%ecx
10fc88: 89 d8 mov %ebx,%eax
10fc8a: eb e5 jmp 10fc71 <rtems_assoc_ptr_by_remote+0x2d>
10fc8c: 89 c8 mov %ecx,%eax
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
10fc8e: 5b pop %ebx
10fc8f: 5e pop %esi
10fc90: 5f pop %edi
10fc91: c9 leave
10fc92: c3 ret
10fc93: 90 nop
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;
10fc94: 31 c0 xor %eax,%eax
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
10fc96: 5b pop %ebx
10fc97: 5e pop %esi
10fc98: 5f pop %edi
10fc99: c9 leave
10fc9a: c3 ret
00108b4c <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
108b4c: 55 push %ebp
108b4d: 89 e5 mov %esp,%ebp
108b4f: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
108b52: ff 75 0c pushl 0xc(%ebp)
108b55: ff 75 08 pushl 0x8(%ebp)
108b58: e8 7b fe ff ff call 1089d8 <rtems_assoc_ptr_by_local>
if (nap)
108b5d: 83 c4 10 add $0x10,%esp
108b60: 85 c0 test %eax,%eax
108b62: 74 08 je 108b6c <rtems_assoc_remote_by_local+0x20>
return nap->remote_value;
108b64: 8b 40 08 mov 0x8(%eax),%eax
return 0;
}
108b67: c9 leave
108b68: c3 ret
108b69: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->remote_value;
return 0;
108b6c: 31 c0 xor %eax,%eax
}
108b6e: c9 leave
108b6f: c3 ret
00108b00 <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
108b00: 55 push %ebp
108b01: 89 e5 mov %esp,%ebp
108b03: 57 push %edi
108b04: 56 push %esi
108b05: 53 push %ebx
108b06: 83 ec 1c sub $0x1c,%esp
108b09: 8b 7d 0c mov 0xc(%ebp),%edi
108b0c: be 20 00 00 00 mov $0x20,%esi
uint32_t b;
uint32_t remote_value = 0;
108b11: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
for (b = 1; b; b <<= 1)
108b18: bb 01 00 00 00 mov $0x1,%ebx
108b1d: eb 06 jmp 108b25 <rtems_assoc_remote_by_local_bitfield+0x25>
108b1f: 90 nop
108b20: d1 e3 shl %ebx
108b22: 4e dec %esi
108b23: 74 1b je 108b40 <rtems_assoc_remote_by_local_bitfield+0x40>
if (b & local_value)
108b25: 85 fb test %edi,%ebx
108b27: 74 f7 je 108b20 <rtems_assoc_remote_by_local_bitfield+0x20>
remote_value |= rtems_assoc_remote_by_local(ap, b);
108b29: 83 ec 08 sub $0x8,%esp
108b2c: 53 push %ebx
108b2d: ff 75 08 pushl 0x8(%ebp)
108b30: e8 17 00 00 00 call 108b4c <rtems_assoc_remote_by_local>
108b35: 09 45 e4 or %eax,-0x1c(%ebp)
108b38: 83 c4 10 add $0x10,%esp
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
108b3b: d1 e3 shl %ebx
108b3d: 4e dec %esi
108b3e: 75 e5 jne 108b25 <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;
}
108b40: 8b 45 e4 mov -0x1c(%ebp),%eax
108b43: 8d 65 f4 lea -0xc(%ebp),%esp
108b46: 5b pop %ebx
108b47: 5e pop %esi
108b48: 5f pop %edi
108b49: c9 leave
108b4a: c3 ret
00108b70 <rtems_assoc_remote_by_name>:
uint32_t rtems_assoc_remote_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
108b70: 55 push %ebp
108b71: 89 e5 mov %esp,%ebp
108b73: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_name(ap, name);
108b76: ff 75 0c pushl 0xc(%ebp)
108b79: ff 75 08 pushl 0x8(%ebp)
108b7c: e8 af fe ff ff call 108a30 <rtems_assoc_ptr_by_name>
if (nap)
108b81: 83 c4 10 add $0x10,%esp
108b84: 85 c0 test %eax,%eax
108b86: 74 08 je 108b90 <rtems_assoc_remote_by_name+0x20>
return nap->remote_value;
108b88: 8b 40 08 mov 0x8(%eax),%eax
return 0;
}
108b8b: c9 leave
108b8c: c3 ret
108b8d: 8d 76 00 lea 0x0(%esi),%esi
nap = rtems_assoc_ptr_by_name(ap, name);
if (nap)
return nap->remote_value;
return 0;
108b90: 31 c0 xor %eax,%eax
}
108b92: c9 leave
108b93: c3 ret
00113704 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
113704: 55 push %ebp
113705: 89 e5 mov %esp,%ebp
113707: 57 push %edi
113708: 56 push %esi
113709: 53 push %ebx
11370a: 83 ec 2c sub $0x2c,%esp
11370d: 8b 5d 08 mov 0x8(%ebp),%ebx
113710: 8b 7d 0c mov 0xc(%ebp),%edi
113713: 8b 45 10 mov 0x10(%ebp),%eax
113716: 8b 75 14 mov 0x14(%ebp),%esi
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
113719: 85 db test %ebx,%ebx
11371b: 0f 84 87 00 00 00 je 1137a8 <rtems_barrier_create+0xa4><== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
113721: 85 f6 test %esi,%esi
113723: 0f 84 bf 00 00 00 je 1137e8 <rtems_barrier_create+0xe4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
113729: f7 c7 10 00 00 00 test $0x10,%edi
11372f: 0f 84 83 00 00 00 je 1137b8 <rtems_barrier_create+0xb4>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
113735: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
if ( maximum_waiters == 0 )
11373c: 85 c0 test %eax,%eax
11373e: 0f 84 80 00 00 00 je 1137c4 <rtems_barrier_create+0xc0><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
113744: 89 45 e4 mov %eax,-0x1c(%ebp)
113747: a1 30 a8 12 00 mov 0x12a830,%eax
11374c: 40 inc %eax
11374d: a3 30 a8 12 00 mov %eax,0x12a830
* 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 );
113752: 83 ec 0c sub $0xc,%esp
113755: 68 20 b2 12 00 push $0x12b220
11375a: e8 49 b0 ff ff call 10e7a8 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
11375f: 83 c4 10 add $0x10,%esp
113762: 85 c0 test %eax,%eax
113764: 74 6e je 1137d4 <rtems_barrier_create+0xd0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
113766: 89 78 10 mov %edi,0x10(%eax)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
113769: 83 ec 08 sub $0x8,%esp
11376c: 8d 55 e0 lea -0x20(%ebp),%edx
11376f: 52 push %edx
113770: 8d 50 14 lea 0x14(%eax),%edx
113773: 52 push %edx
113774: 89 45 d4 mov %eax,-0x2c(%ebp)
113777: e8 c0 07 00 00 call 113f3c <_CORE_barrier_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
11377c: 8b 45 d4 mov -0x2c(%ebp),%eax
11377f: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
113782: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
113785: 8b 0d 3c b2 12 00 mov 0x12b23c,%ecx
11378b: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
11378e: 89 58 0c mov %ebx,0xc(%eax)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
113791: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
113793: e8 7c c0 ff ff call 10f814 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
113798: 83 c4 10 add $0x10,%esp
11379b: 31 c0 xor %eax,%eax
}
11379d: 8d 65 f4 lea -0xc(%ebp),%esp
1137a0: 5b pop %ebx
1137a1: 5e pop %esi
1137a2: 5f pop %edi
1137a3: c9 leave
1137a4: c3 ret
1137a5: 8d 76 00 lea 0x0(%esi),%esi
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
1137a8: b8 03 00 00 00 mov $0x3,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1137ad: 8d 65 f4 lea -0xc(%ebp),%esp
1137b0: 5b pop %ebx
1137b1: 5e pop %esi
1137b2: 5f pop %edi
1137b3: c9 leave
1137b4: c3 ret
1137b5: 8d 76 00 lea 0x0(%esi),%esi
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;
1137b8: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp)
1137bf: eb 83 jmp 113744 <rtems_barrier_create+0x40>
1137c1: 8d 76 00 lea 0x0(%esi),%esi
/* 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;
1137c4: b8 0a 00 00 00 mov $0xa,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1137c9: 8d 65 f4 lea -0xc(%ebp),%esp
1137cc: 5b pop %ebx
1137cd: 5e pop %esi
1137ce: 5f pop %edi
1137cf: c9 leave
1137d0: c3 ret
1137d1: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
1137d4: e8 3b c0 ff ff call 10f814 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
1137d9: b8 05 00 00 00 mov $0x5,%eax
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1137de: 8d 65 f4 lea -0xc(%ebp),%esp
1137e1: 5b pop %ebx
1137e2: 5e pop %esi
1137e3: 5f pop %edi
1137e4: c9 leave
1137e5: c3 ret
1137e6: 66 90 xchg %ax,%ax
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
1137e8: b8 09 00 00 00 mov $0x9,%eax
1137ed: eb ae jmp 11379d <rtems_barrier_create+0x99>
00107d6c <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
107d6c: 55 push %ebp
107d6d: 89 e5 mov %esp,%ebp
107d6f: 57 push %edi
107d70: 56 push %esi
107d71: 53 push %ebx
107d72: 83 ec 1c sub $0x1c,%esp
107d75: 8b 45 08 mov 0x8(%ebp),%eax
107d78: 8b 5d 0c mov 0xc(%ebp),%ebx
107d7b: 8b 75 10 mov 0x10(%ebp),%esi
const char *p;
if ( !name )
107d7e: 85 c0 test %eax,%eax
107d80: 75 0a jne 107d8c <rtems_bsp_cmdline_get_param+0x20>
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
return NULL;
107d82: 31 c0 xor %eax,%eax
copy_string( p, value, length );
return value;
}
107d84: 8d 65 f4 lea -0xc(%ebp),%esp
107d87: 5b pop %ebx
107d88: 5e pop %esi
107d89: 5f pop %edi
107d8a: c9 leave
107d8b: c3 ret
const char *p;
if ( !name )
return NULL;
if ( !value )
107d8c: 85 db test %ebx,%ebx
107d8e: 74 f2 je 107d82 <rtems_bsp_cmdline_get_param+0x16>
return NULL;
if ( !length )
107d90: 85 f6 test %esi,%esi
107d92: 74 ee je 107d82 <rtems_bsp_cmdline_get_param+0x16>
return NULL;
value[0] = '\0';
107d94: c6 03 00 movb $0x0,(%ebx)
p = rtems_bsp_cmdline_get_param_raw( name );
107d97: 83 ec 0c sub $0xc,%esp
107d9a: 50 push %eax
107d9b: e8 4c 00 00 00 call 107dec <rtems_bsp_cmdline_get_param_raw>
if ( !p )
107da0: 83 c4 10 add $0x10,%esp
107da3: 85 c0 test %eax,%eax
107da5: 74 db je 107d82 <rtems_bsp_cmdline_get_param+0x16>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
107da7: 8a 08 mov (%eax),%cl
107da9: 84 c9 test %cl,%cl
107dab: 74 3a je 107de7 <rtems_bsp_cmdline_get_param+0x7b><== NEVER TAKEN
107dad: 4e dec %esi
107dae: 89 75 e4 mov %esi,-0x1c(%ebp)
107db1: 74 34 je 107de7 <rtems_bsp_cmdline_get_param+0x7b><== NEVER TAKEN
107db3: 31 f6 xor %esi,%esi
107db5: 31 d2 xor %edx,%edx
107db7: 31 ff xor %edi,%edi
107db9: eb 24 jmp 107ddf <rtems_bsp_cmdline_get_param+0x73>
107dbb: 90 nop
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
107dbc: f7 c7 01 00 00 00 test $0x1,%edi
107dc2: 75 05 jne 107dc9 <rtems_bsp_cmdline_get_param+0x5d>
107dc4: 80 f9 20 cmp $0x20,%cl
107dc7: 74 1e je 107de7 <rtems_bsp_cmdline_get_param+0x7b>
break;
value[i++] = *p++;
107dc9: 88 0c 33 mov %cl,(%ebx,%esi,1)
107dcc: 42 inc %edx
value[i] = '\0';
107dcd: 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; ) {
107dd1: 8a 0c 10 mov (%eax,%edx,1),%cl
107dd4: 84 c9 test %cl,%cl
107dd6: 74 0f je 107de7 <rtems_bsp_cmdline_get_param+0x7b>
107dd8: 3b 55 e4 cmp -0x1c(%ebp),%edx
107ddb: 73 0a jae 107de7 <rtems_bsp_cmdline_get_param+0x7b>
107ddd: 89 d6 mov %edx,%esi
if ( *p == '\"' ) {
107ddf: 80 f9 22 cmp $0x22,%cl
107de2: 75 d8 jne 107dbc <rtems_bsp_cmdline_get_param+0x50>
quotes++;
107de4: 47 inc %edi
107de5: eb e2 jmp 107dc9 <rtems_bsp_cmdline_get_param+0x5d>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
107de7: 89 d8 mov %ebx,%eax
107de9: eb 99 jmp 107d84 <rtems_bsp_cmdline_get_param+0x18>
00107dec <rtems_bsp_cmdline_get_param_raw>:
extern const char *bsp_boot_cmdline;
const char *rtems_bsp_cmdline_get_param_raw(
const char *name
)
{
107dec: 55 push %ebp
107ded: 89 e5 mov %esp,%ebp
107def: 83 ec 08 sub $0x8,%esp
107df2: 8b 45 08 mov 0x8(%ebp),%eax
const char *p;
if ( !name )
107df5: 85 c0 test %eax,%eax
107df7: 75 07 jne 107e00 <rtems_bsp_cmdline_get_param_raw+0x14>
return NULL;
if ( !bsp_boot_cmdline )
return NULL;
107df9: 31 c0 xor %eax,%eax
p = strstr(bsp_boot_cmdline, name);
/* printf( "raw: %p (%s)\n", p, p ); */
return p;
}
107dfb: c9 leave
107dfc: c3 ret
107dfd: 8d 76 00 lea 0x0(%esi),%esi
const char *p;
if ( !name )
return NULL;
if ( !bsp_boot_cmdline )
107e00: 8b 15 f8 85 12 00 mov 0x1285f8,%edx
107e06: 85 d2 test %edx,%edx
107e08: 74 ef je 107df9 <rtems_bsp_cmdline_get_param_raw+0xd>
return NULL;
p = strstr(bsp_boot_cmdline, name);
107e0a: 83 ec 08 sub $0x8,%esp
107e0d: 50 push %eax
107e0e: 52 push %edx
107e0f: e8 f8 cd 00 00 call 114c0c <strstr>
107e14: 83 c4 10 add $0x10,%esp
/* printf( "raw: %p (%s)\n", p, p ); */
return p;
}
107e17: c9 leave
107e18: c3 ret
0010c268 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
10c268: 55 push %ebp
10c269: 89 e5 mov %esp,%ebp
10c26b: 56 push %esi
10c26c: 53 push %ebx
10c26d: 8b 5d 10 mov 0x10(%ebp),%ebx
10c270: 8b 75 14 mov 0x14(%ebp),%esi
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Append_with_empty_check( chain, node );
10c273: 83 ec 08 sub $0x8,%esp
10c276: ff 75 0c pushl 0xc(%ebp)
10c279: ff 75 08 pushl 0x8(%ebp)
10c27c: e8 eb 04 00 00 call 10c76c <_Chain_Append_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
10c281: 83 c4 10 add $0x10,%esp
10c284: 84 c0 test %al,%al
10c286: 75 0c jne 10c294 <rtems_chain_append_with_notification+0x2c>
sc = rtems_event_send( task, events );
}
return sc;
}
10c288: 31 c0 xor %eax,%eax
10c28a: 8d 65 f8 lea -0x8(%ebp),%esp
10c28d: 5b pop %ebx
10c28e: 5e pop %esi
10c28f: c9 leave
10c290: c3 ret
10c291: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
10c294: 89 75 0c mov %esi,0xc(%ebp)
10c297: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10c29a: 8d 65 f8 lea -0x8(%ebp),%esp
10c29d: 5b pop %ebx
10c29e: 5e pop %esi
10c29f: c9 leave
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
10c2a0: e9 af f5 ff ff jmp 10b854 <rtems_event_send>
0010c2a8 <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
10c2a8: 55 push %ebp
10c2a9: 89 e5 mov %esp,%ebp
10c2ab: 56 push %esi
10c2ac: 53 push %ebx
10c2ad: 8b 5d 0c mov 0xc(%ebp),%ebx
10c2b0: 8b 75 10 mov 0x10(%ebp),%esi
RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node **node
)
{
return _Chain_Get_with_empty_check( chain, node );
10c2b3: 83 ec 08 sub $0x8,%esp
10c2b6: ff 75 14 pushl 0x14(%ebp)
10c2b9: ff 75 08 pushl 0x8(%ebp)
10c2bc: e8 13 05 00 00 call 10c7d4 <_Chain_Get_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
10c2c1: 83 c4 10 add $0x10,%esp
10c2c4: 84 c0 test %al,%al
10c2c6: 75 0c jne 10c2d4 <rtems_chain_get_with_notification+0x2c>
sc = rtems_event_send( task, events );
}
return sc;
}
10c2c8: 31 c0 xor %eax,%eax
10c2ca: 8d 65 f8 lea -0x8(%ebp),%esp
10c2cd: 5b pop %ebx
10c2ce: 5e pop %esi
10c2cf: c9 leave
10c2d0: c3 ret
10c2d1: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
10c2d4: 89 75 0c mov %esi,0xc(%ebp)
10c2d7: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10c2da: 8d 65 f8 lea -0x8(%ebp),%esp
10c2dd: 5b pop %ebx
10c2de: 5e pop %esi
10c2df: c9 leave
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
10c2e0: e9 6f f5 ff ff jmp 10b854 <rtems_event_send>
0010c2e8 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
10c2e8: 55 push %ebp
10c2e9: 89 e5 mov %esp,%ebp
10c2eb: 57 push %edi
10c2ec: 56 push %esi
10c2ed: 53 push %ebx
10c2ee: 83 ec 1c sub $0x1c,%esp
10c2f1: 8b 75 08 mov 0x8(%ebp),%esi
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
10c2f4: 8d 7d e4 lea -0x1c(%ebp),%edi
10c2f7: 90 nop
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
10c2f8: 83 ec 0c sub $0xc,%esp
10c2fb: 56 push %esi
10c2fc: e8 0f 05 00 00 call 10c810 <_Chain_Get>
10c301: 89 c3 mov %eax,%ebx
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10c303: 83 c4 10 add $0x10,%esp
10c306: 85 c0 test %eax,%eax
10c308: 75 22 jne 10c32c <rtems_chain_get_with_wait+0x44>
) {
rtems_event_set out;
sc = rtems_event_receive(
10c30a: 57 push %edi
10c30b: ff 75 10 pushl 0x10(%ebp)
10c30e: 6a 00 push $0x0
10c310: ff 75 0c pushl 0xc(%ebp)
10c313: e8 b4 f3 ff ff call 10b6cc <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
10c318: 83 c4 10 add $0x10,%esp
10c31b: 85 c0 test %eax,%eax
10c31d: 74 d9 je 10c2f8 <rtems_chain_get_with_wait+0x10><== NEVER TAKEN
timeout,
&out
);
}
*node_ptr = node;
10c31f: 8b 55 14 mov 0x14(%ebp),%edx
10c322: 89 1a mov %ebx,(%edx)
return sc;
}
10c324: 8d 65 f4 lea -0xc(%ebp),%esp
10c327: 5b pop %ebx
10c328: 5e pop %esi
10c329: 5f pop %edi
10c32a: c9 leave
10c32b: c3 ret
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
10c32c: 31 c0 xor %eax,%eax
timeout,
&out
);
}
*node_ptr = node;
10c32e: 8b 55 14 mov 0x14(%ebp),%edx
10c331: 89 1a mov %ebx,(%edx)
return sc;
}
10c333: 8d 65 f4 lea -0xc(%ebp),%esp
10c336: 5b pop %ebx
10c337: 5e pop %esi
10c338: 5f pop %edi
10c339: c9 leave
10c33a: c3 ret
0010c33c <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
10c33c: 55 push %ebp
10c33d: 89 e5 mov %esp,%ebp
10c33f: 56 push %esi
10c340: 53 push %ebx
10c341: 8b 5d 10 mov 0x10(%ebp),%ebx
10c344: 8b 75 14 mov 0x14(%ebp),%esi
RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Prepend_with_empty_check( chain, node );
10c347: 83 ec 08 sub $0x8,%esp
10c34a: ff 75 0c pushl 0xc(%ebp)
10c34d: ff 75 08 pushl 0x8(%ebp)
10c350: e8 ff 04 00 00 call 10c854 <_Chain_Prepend_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
10c355: 83 c4 10 add $0x10,%esp
10c358: 84 c0 test %al,%al
10c35a: 75 0c jne 10c368 <rtems_chain_prepend_with_notification+0x2c>
sc = rtems_event_send( task, events );
}
return sc;
}
10c35c: 31 c0 xor %eax,%eax
10c35e: 8d 65 f8 lea -0x8(%ebp),%esp
10c361: 5b pop %ebx
10c362: 5e pop %esi
10c363: c9 leave
10c364: c3 ret
10c365: 8d 76 00 lea 0x0(%esi),%esi
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
10c368: 89 75 0c mov %esi,0xc(%ebp)
10c36b: 89 5d 08 mov %ebx,0x8(%ebp)
}
return sc;
}
10c36e: 8d 65 f8 lea -0x8(%ebp),%esp
10c371: 5b pop %ebx
10c372: 5e pop %esi
10c373: c9 leave
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
10c374: e9 db f4 ff ff jmp 10b854 <rtems_event_send>
00115aa8 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
115aa8: 55 push %ebp
115aa9: 89 e5 mov %esp,%ebp
115aab: 53 push %ebx
115aac: 83 ec 04 sub $0x4,%esp
115aaf: 8b 45 08 mov 0x8(%ebp),%eax
115ab2: 8b 5d 0c mov 0xc(%ebp),%ebx
if ( !time_buffer )
115ab5: 85 db test %ebx,%ebx
115ab7: 74 3b je 115af4 <rtems_clock_get+0x4c>
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
115ab9: 85 c0 test %eax,%eax
115abb: 74 2b je 115ae8 <rtems_clock_get+0x40>
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
115abd: 83 f8 01 cmp $0x1,%eax
115ac0: 74 3e je 115b00 <rtems_clock_get+0x58>
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
115ac2: 83 f8 02 cmp $0x2,%eax
115ac5: 74 45 je 115b0c <rtems_clock_get+0x64>
*interval = rtems_clock_get_ticks_since_boot();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
115ac7: 83 f8 03 cmp $0x3,%eax
115aca: 74 4c je 115b18 <rtems_clock_get+0x70>
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
115acc: 83 f8 04 cmp $0x4,%eax
115acf: 74 0b je 115adc <rtems_clock_get+0x34>
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
115ad1: b8 0a 00 00 00 mov $0xa,%eax
}
115ad6: 5a pop %edx
115ad7: 5b pop %ebx
115ad8: c9 leave
115ad9: c3 ret
115ada: 66 90 xchg %ax,%ax
*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 );
115adc: 89 5d 08 mov %ebx,0x8(%ebp)
return RTEMS_INVALID_NUMBER;
}
115adf: 59 pop %ecx
115ae0: 5b pop %ebx
115ae1: 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 );
115ae2: e9 41 01 00 00 jmp 115c28 <rtems_clock_get_tod_timeval>
115ae7: 90 nop
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
115ae8: 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;
}
115aeb: 58 pop %eax
115aec: 5b pop %ebx
115aed: 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 );
115aee: e9 81 00 00 00 jmp 115b74 <rtems_clock_get_tod>
115af3: 90 nop
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
115af4: 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;
}
115af9: 5a pop %edx
115afa: 5b pop %ebx
115afb: c9 leave
115afc: c3 ret
115afd: 8d 76 00 lea 0x0(%esi),%esi
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);
115b00: 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;
}
115b03: 5b pop %ebx
115b04: 5b pop %ebx
115b05: 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);
115b06: e9 19 00 00 00 jmp 115b24 <rtems_clock_get_seconds_since_epoch>
115b0b: 90 nop
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
115b0c: e8 57 00 00 00 call 115b68 <rtems_clock_get_ticks_since_boot>
115b11: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
115b13: 31 c0 xor %eax,%eax
115b15: eb bf jmp 115ad6 <rtems_clock_get+0x2e>
115b17: 90 nop
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
115b18: e8 37 00 00 00 call 115b54 <rtems_clock_get_ticks_per_second>
115b1d: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
115b1f: 31 c0 xor %eax,%eax
115b21: eb b3 jmp 115ad6 <rtems_clock_get+0x2e>
00115c28 <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
115c28: 55 push %ebp
115c29: 89 e5 mov %esp,%ebp
115c2b: 56 push %esi
115c2c: 53 push %ebx
115c2d: 83 ec 10 sub $0x10,%esp
115c30: 8b 5d 08 mov 0x8(%ebp),%ebx
if ( !time )
115c33: 85 db test %ebx,%ebx
115c35: 74 51 je 115c88 <rtems_clock_get_tod_timeval+0x60>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
115c37: 80 3d 04 2b 14 00 00 cmpb $0x0,0x142b04
115c3e: 75 0c jne 115c4c <rtems_clock_get_tod_timeval+0x24>
return RTEMS_NOT_DEFINED;
115c40: b8 0b 00 00 00 mov $0xb,%eax
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
115c45: 8d 65 f8 lea -0x8(%ebp),%esp
115c48: 5b pop %ebx
115c49: 5e pop %esi
115c4a: c9 leave
115c4b: c3 ret
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
115c4c: 9c pushf
115c4d: fa cli
115c4e: 5e pop %esi
_TOD_Get( &now );
115c4f: 83 ec 0c sub $0xc,%esp
115c52: 8d 45 f0 lea -0x10(%ebp),%eax
115c55: 50 push %eax
115c56: e8 1d 44 00 00 call 11a078 <_TOD_Get>
_ISR_Enable(level);
115c5b: 56 push %esi
115c5c: 9d popf
useconds = (suseconds_t)now.tv_nsec;
115c5d: 8b 4d f4 mov -0xc(%ebp),%ecx
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
115c60: 8b 45 f0 mov -0x10(%ebp),%eax
115c63: 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;
115c65: b8 d3 4d 62 10 mov $0x10624dd3,%eax
115c6a: f7 e9 imul %ecx
115c6c: 89 d0 mov %edx,%eax
115c6e: c1 f8 06 sar $0x6,%eax
115c71: c1 f9 1f sar $0x1f,%ecx
115c74: 29 c8 sub %ecx,%eax
115c76: 89 43 04 mov %eax,0x4(%ebx)
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
115c79: 83 c4 10 add $0x10,%esp
115c7c: 31 c0 xor %eax,%eax
}
115c7e: 8d 65 f8 lea -0x8(%ebp),%esp
115c81: 5b pop %ebx
115c82: 5e pop %esi
115c83: c9 leave
115c84: c3 ret
115c85: 8d 76 00 lea 0x0(%esi),%esi
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
if ( !time )
return RTEMS_INVALID_ADDRESS;
115c88: b8 09 00 00 00 mov $0x9,%eax
115c8d: eb b6 jmp 115c45 <rtems_clock_get_tod_timeval+0x1d>
0010b21c <rtems_clock_get_uptime>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
10b21c: 55 push %ebp
10b21d: 89 e5 mov %esp,%ebp
10b21f: 83 ec 08 sub $0x8,%esp
10b222: 8b 45 08 mov 0x8(%ebp),%eax
if ( !uptime )
10b225: 85 c0 test %eax,%eax
10b227: 74 13 je 10b23c <rtems_clock_get_uptime+0x20>
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
10b229: 83 ec 0c sub $0xc,%esp
10b22c: 50 push %eax
10b22d: e8 76 16 00 00 call 10c8a8 <_TOD_Get_uptime_as_timespec>
return RTEMS_SUCCESSFUL;
10b232: 83 c4 10 add $0x10,%esp
10b235: 31 c0 xor %eax,%eax
}
10b237: c9 leave
10b238: c3 ret
10b239: 8d 76 00 lea 0x0(%esi),%esi
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
return RTEMS_INVALID_ADDRESS;
10b23c: b8 09 00 00 00 mov $0x9,%eax
_TOD_Get_uptime_as_timespec( uptime );
return RTEMS_SUCCESSFUL;
}
10b241: c9 leave
10b242: c3 ret
0010c180 <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
10c180: 55 push %ebp
10c181: 89 e5 mov %esp,%ebp
10c183: 53 push %ebx
10c184: 83 ec 14 sub $0x14,%esp
10c187: 8b 5d 08 mov 0x8(%ebp),%ebx
struct timespec newtime;
if ( !time_buffer )
10c18a: 85 db test %ebx,%ebx
10c18c: 74 66 je 10c1f4 <rtems_clock_set+0x74>
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
10c18e: 83 ec 0c sub $0xc,%esp
10c191: 53 push %ebx
10c192: e8 39 01 00 00 call 10c2d0 <_TOD_Validate>
10c197: 83 c4 10 add $0x10,%esp
10c19a: 84 c0 test %al,%al
10c19c: 75 0a jne 10c1a8 <rtems_clock_set+0x28>
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
10c19e: b8 14 00 00 00 mov $0x14,%eax
}
10c1a3: 8b 5d fc mov -0x4(%ebp),%ebx
10c1a6: c9 leave
10c1a7: c3 ret
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
10c1a8: 83 ec 0c sub $0xc,%esp
10c1ab: 53 push %ebx
10c1ac: e8 93 00 00 00 call 10c244 <_TOD_To_seconds>
10c1b1: 89 45 f0 mov %eax,-0x10(%ebp)
newtime.tv_nsec = time_buffer->ticks *
10c1b4: 8b 43 18 mov 0x18(%ebx),%eax
10c1b7: 0f af 05 ec 72 12 00 imul 0x1272ec,%eax
10c1be: 8d 04 80 lea (%eax,%eax,4),%eax
10c1c1: 8d 04 80 lea (%eax,%eax,4),%eax
10c1c4: 8d 04 80 lea (%eax,%eax,4),%eax
10c1c7: c1 e0 03 shl $0x3,%eax
10c1ca: 89 45 f4 mov %eax,-0xc(%ebp)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c1cd: a1 90 ba 12 00 mov 0x12ba90,%eax
10c1d2: 40 inc %eax
10c1d3: a3 90 ba 12 00 mov %eax,0x12ba90
rtems_configuration_get_nanoseconds_per_tick();
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
10c1d8: 8d 45 f0 lea -0x10(%ebp),%eax
10c1db: 89 04 24 mov %eax,(%esp)
10c1de: e8 55 19 00 00 call 10db38 <_TOD_Set>
_Thread_Enable_dispatch();
10c1e3: e8 b4 2f 00 00 call 10f19c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c1e8: 83 c4 10 add $0x10,%esp
10c1eb: 31 c0 xor %eax,%eax
}
return RTEMS_INVALID_CLOCK;
}
10c1ed: 8b 5d fc mov -0x4(%ebp),%ebx
10c1f0: c9 leave
10c1f1: c3 ret
10c1f2: 66 90 xchg %ax,%ax
)
{
struct timespec newtime;
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
10c1f4: b8 09 00 00 00 mov $0x9,%eax
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
10c1f9: 8b 5d fc mov -0x4(%ebp),%ebx
10c1fc: c9 leave
10c1fd: c3 ret
0010b018 <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
10b018: 55 push %ebp
10b019: 89 e5 mov %esp,%ebp
10b01b: 83 ec 08 sub $0x8,%esp
_TOD_Tickle_ticks();
10b01e: e8 39 15 00 00 call 10c55c <_TOD_Tickle_ticks>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
{
_Watchdog_Tickle( &_Watchdog_Ticks_chain );
10b023: 83 ec 0c sub $0xc,%esp
10b026: 68 20 7f 12 00 push $0x127f20
10b02b: e8 f8 38 00 00 call 10e928 <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
10b030: e8 bf 33 00 00 call 10e3f4 <_Thread_Tickle_timeslice>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
{
return ( _Thread_Dispatch_necessary );
10b035: a0 04 84 12 00 mov 0x128404,%al
if ( _Thread_Is_context_switch_necessary() &&
10b03a: 83 c4 10 add $0x10,%esp
10b03d: 84 c0 test %al,%al
10b03f: 74 09 je 10b04a <rtems_clock_tick+0x32>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
10b041: a1 50 7e 12 00 mov 0x127e50,%eax
10b046: 85 c0 test %eax,%eax
10b048: 74 06 je 10b050 <rtems_clock_tick+0x38>
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
10b04a: 31 c0 xor %eax,%eax
10b04c: c9 leave
10b04d: c3 ret
10b04e: 66 90 xchg %ax,%ax
_Thread_Tickle_timeslice();
if ( _Thread_Is_context_switch_necessary() &&
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
10b050: e8 3b 28 00 00 call 10d890 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
}
10b055: 31 c0 xor %eax,%eax
10b057: c9 leave
10b058: c3 ret
00108420 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
108420: 55 push %ebp
108421: 89 e5 mov %esp,%ebp
108423: 57 push %edi
108424: 56 push %esi
108425: 53 push %ebx
108426: 83 ec 6c sub $0x6c,%esp
Timestamp_Control uptime, total, ran, uptime_at_last_reset;
#else
uint32_t total_units = 0;
#endif
if ( !print )
108429: 8b 55 0c mov 0xc(%ebp),%edx
10842c: 85 d2 test %edx,%edx
10842e: 0f 84 88 01 00 00 je 1085bc <rtems_cpu_usage_report_with_plugin+0x19c><== 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__
uptime_at_last_reset = CPU_usage_Uptime_at_last_reset;
108434: a1 e0 c0 12 00 mov 0x12c0e0,%eax
108439: 8b 15 e4 c0 12 00 mov 0x12c0e4,%edx
10843f: 89 45 c0 mov %eax,-0x40(%ebp)
108442: 89 55 c4 mov %edx,-0x3c(%ebp)
}
}
}
#endif
(*print)(
108445: 83 ec 08 sub $0x8,%esp
108448: 68 f0 3a 12 00 push $0x123af0
10844d: ff 75 08 pushl 0x8(%ebp)
108450: ff 55 0c call *0xc(%ebp)
108453: 83 c4 10 add $0x10,%esp
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
108456: c7 45 90 01 00 00 00 movl $0x1,-0x70(%ebp)
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10845d: 8b 55 90 mov -0x70(%ebp),%edx
108460: 8b 04 95 68 ba 12 00 mov 0x12ba68(,%edx,4),%eax
108467: 8b 70 04 mov 0x4(%eax),%esi
if ( information ) {
10846a: 85 f6 test %esi,%esi
10846c: 0f 84 1e 01 00 00 je 108590 <rtems_cpu_usage_report_with_plugin+0x170><== NEVER TAKEN
for ( i=1 ; i <= information->maximum ; i++ ) {
108472: 66 83 7e 10 00 cmpw $0x0,0x10(%esi)
108477: 0f 84 13 01 00 00 je 108590 <rtems_cpu_usage_report_with_plugin+0x170>
10847d: bb 01 00 00 00 mov $0x1,%ebx
108482: eb 6d jmp 1084f1 <rtems_cpu_usage_report_with_plugin+0xd1>
Timestamp_Control last = _Thread_Time_of_last_context_switch;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract( &last, &uptime, &used );
_Timestamp_Add_to( &ran, &used );
} else {
_TOD_Get_uptime( &uptime );
108484: 83 ec 0c sub $0xc,%esp
108487: 8d 7d d8 lea -0x28(%ebp),%edi
10848a: 57 push %edi
10848b: e8 20 56 00 00 call 10dab0 <_TOD_Get_uptime>
108490: 83 c4 10 add $0x10,%esp
108493: 8d 55 c8 lea -0x38(%ebp),%edx
108496: 89 55 94 mov %edx,-0x6c(%ebp)
}
_Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total );
108499: 50 push %eax
10849a: 8d 45 d0 lea -0x30(%ebp),%eax
10849d: 50 push %eax
10849e: 57 push %edi
10849f: 8d 55 c0 lea -0x40(%ebp),%edx
1084a2: 52 push %edx
1084a3: e8 c4 78 00 00 call 10fd6c <_Timespec_Subtract>
_Timestamp_Divide( &ran, &total, &ival, &fval );
1084a8: 8d 45 e0 lea -0x20(%ebp),%eax
1084ab: 50 push %eax
1084ac: 8d 55 e4 lea -0x1c(%ebp),%edx
1084af: 52 push %edx
1084b0: 8d 45 d0 lea -0x30(%ebp),%eax
1084b3: 50 push %eax
1084b4: ff 75 94 pushl -0x6c(%ebp)
1084b7: e8 ec 77 00 00 call 10fca8 <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
1084bc: 83 c4 18 add $0x18,%esp
1084bf: ff 75 e0 pushl -0x20(%ebp)
1084c2: ff 75 e4 pushl -0x1c(%ebp)
1084c5: ba d3 4d 62 10 mov $0x10624dd3,%edx
1084ca: 8b 45 cc mov -0x34(%ebp),%eax
1084cd: f7 e2 mul %edx
1084cf: c1 ea 06 shr $0x6,%edx
1084d2: 52 push %edx
1084d3: ff 75 c8 pushl -0x38(%ebp)
1084d6: 68 63 3d 12 00 push $0x123d63
1084db: ff 75 08 pushl 0x8(%ebp)
1084de: ff 55 0c call *0xc(%ebp)
1084e1: 83 c4 20 add $0x20,%esp
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
1084e4: 43 inc %ebx
1084e5: 0f b7 46 10 movzwl 0x10(%esi),%eax
1084e9: 39 d8 cmp %ebx,%eax
1084eb: 0f 82 9f 00 00 00 jb 108590 <rtems_cpu_usage_report_with_plugin+0x170>
the_thread = (Thread_Control *)information->local_table[ i ];
1084f1: 8b 46 1c mov 0x1c(%esi),%eax
1084f4: 8b 3c 98 mov (%eax,%ebx,4),%edi
if ( !the_thread )
1084f7: 85 ff test %edi,%edi
1084f9: 74 e9 je 1084e4 <rtems_cpu_usage_report_with_plugin+0xc4><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
1084fb: 50 push %eax
1084fc: 8d 45 a3 lea -0x5d(%ebp),%eax
1084ff: 50 push %eax
108500: 6a 0d push $0xd
108502: ff 77 08 pushl 0x8(%edi)
108505: e8 5a 42 00 00 call 10c764 <rtems_object_get_name>
(*print)(
10850a: 8d 55 a3 lea -0x5d(%ebp),%edx
10850d: 52 push %edx
10850e: ff 77 08 pushl 0x8(%edi)
108511: 68 50 3d 12 00 push $0x123d50
108516: ff 75 08 pushl 0x8(%ebp)
108519: 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;
10851c: 8b 87 84 00 00 00 mov 0x84(%edi),%eax
108522: 8b 97 88 00 00 00 mov 0x88(%edi),%edx
108528: 89 45 c8 mov %eax,-0x38(%ebp)
10852b: 89 55 cc mov %edx,-0x34(%ebp)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
10852e: 83 c4 20 add $0x20,%esp
108531: a1 78 c0 12 00 mov 0x12c078,%eax
108536: 8b 57 08 mov 0x8(%edi),%edx
108539: 39 50 08 cmp %edx,0x8(%eax)
10853c: 0f 85 42 ff ff ff jne 108484 <rtems_cpu_usage_report_with_plugin+0x64>
Timestamp_Control used;
Timestamp_Control last = _Thread_Time_of_last_context_switch;
108542: a1 4c bb 12 00 mov 0x12bb4c,%eax
108547: 8b 15 50 bb 12 00 mov 0x12bb50,%edx
10854d: 89 45 b0 mov %eax,-0x50(%ebp)
108550: 89 55 b4 mov %edx,-0x4c(%ebp)
_TOD_Get_uptime( &uptime );
108553: 83 ec 0c sub $0xc,%esp
108556: 8d 7d d8 lea -0x28(%ebp),%edi
108559: 57 push %edi
10855a: e8 51 55 00 00 call 10dab0 <_TOD_Get_uptime>
_Timestamp_Subtract( &last, &uptime, &used );
10855f: 83 c4 0c add $0xc,%esp
108562: 8d 45 b8 lea -0x48(%ebp),%eax
108565: 50 push %eax
108566: 57 push %edi
108567: 8d 55 b0 lea -0x50(%ebp),%edx
10856a: 52 push %edx
10856b: 89 45 8c mov %eax,-0x74(%ebp)
10856e: e8 f9 77 00 00 call 10fd6c <_Timespec_Subtract>
_Timestamp_Add_to( &ran, &used );
108573: 5a pop %edx
108574: 59 pop %ecx
108575: 8b 45 8c mov -0x74(%ebp),%eax
108578: 50 push %eax
108579: 8d 45 c8 lea -0x38(%ebp),%eax
10857c: 89 45 94 mov %eax,-0x6c(%ebp)
10857f: 50 push %eax
108580: e8 e7 76 00 00 call 10fc6c <_Timespec_Add_to>
108585: 83 c4 10 add $0x10,%esp
108588: e9 0c ff ff ff jmp 108499 <rtems_cpu_usage_report_with_plugin+0x79>
10858d: 8d 76 00 lea 0x0(%esi),%esi
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
108590: ff 45 90 incl -0x70(%ebp)
108593: 83 7d 90 04 cmpl $0x4,-0x70(%ebp)
108597: 0f 85 c0 fe ff ff jne 10845d <rtems_cpu_usage_report_with_plugin+0x3d>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
10859d: ba d3 4d 62 10 mov $0x10624dd3,%edx
1085a2: 8b 45 d4 mov -0x2c(%ebp),%eax
1085a5: f7 e2 mul %edx
1085a7: c1 ea 06 shr $0x6,%edx
1085aa: 52 push %edx
1085ab: ff 75 d0 pushl -0x30(%ebp)
1085ae: 68 64 3c 12 00 push $0x123c64
1085b3: ff 75 08 pushl 0x8(%ebp)
1085b6: ff 55 0c call *0xc(%ebp)
1085b9: 83 c4 10 add $0x10,%esp
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
1085bc: 8d 65 f4 lea -0xc(%ebp),%esp
1085bf: 5b pop %ebx
1085c0: 5e pop %esi
1085c1: 5f pop %edi
1085c2: c9 leave
1085c3: c3 ret
00113258 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
113258: 55 push %ebp
113259: 89 e5 mov %esp,%ebp
11325b: 53 push %ebx
11325c: 83 ec 04 sub $0x4,%esp
11325f: 8b 45 08 mov 0x8(%ebp),%eax
if (sc == RTEMS_SUCCESSFUL) {
113262: 85 c0 test %eax,%eax
113264: 75 06 jne 11326c <rtems_deviceio_errno+0x14>
return 0;
113266: 31 c0 xor %eax,%eax
errno = eno;
return -1;
}
}
113268: 5a pop %edx
113269: 5b pop %ebx
11326a: c9 leave
11326b: c3 ret
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
11326c: 83 f8 1c cmp $0x1c,%eax
11326f: 77 17 ja 113288 <rtems_deviceio_errno+0x30><== NEVER TAKEN
eno = status_code_to_errno [sc];
113271: 8b 1c 85 80 1c 12 00 mov 0x121c80(,%eax,4),%ebx
}
errno = eno;
113278: e8 67 00 00 00 call 1132e4 <__errno>
11327d: 89 18 mov %ebx,(%eax)
return -1;
11327f: b8 ff ff ff ff mov $0xffffffff,%eax
113284: eb e2 jmp 113268 <rtems_deviceio_errno+0x10>
113286: 66 90 xchg %ax,%ax
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
113288: bb 16 00 00 00 mov $0x16,%ebx <== NOT EXECUTED
11328d: eb e9 jmp 113278 <rtems_deviceio_errno+0x20><== NOT EXECUTED
0010b1e4 <rtems_event_send>:
rtems_status_code rtems_event_send(
rtems_id id,
rtems_event_set event_in
)
{
10b1e4: 55 push %ebp
10b1e5: 89 e5 mov %esp,%ebp
10b1e7: 53 push %ebx
10b1e8: 83 ec 1c sub $0x1c,%esp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
the_thread = _Thread_Get( id, &location );
10b1eb: 8d 45 f4 lea -0xc(%ebp),%eax
10b1ee: 50 push %eax
10b1ef: ff 75 08 pushl 0x8(%ebp)
10b1f2: e8 35 28 00 00 call 10da2c <_Thread_Get>
switch ( location ) {
10b1f7: 83 c4 10 add $0x10,%esp
10b1fa: 8b 55 f4 mov -0xc(%ebp),%edx
10b1fd: 85 d2 test %edx,%edx
10b1ff: 75 2b jne 10b22c <rtems_event_send+0x48>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
10b201: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
rtems_event_set *the_event_set
)
{
ISR_Level level;
_ISR_Disable( level );
10b207: 9c pushf
10b208: fa cli
10b209: 59 pop %ecx
*the_event_set |= the_new_events;
10b20a: 8b 5d 0c mov 0xc(%ebp),%ebx
10b20d: 09 1a or %ebx,(%edx)
_ISR_Enable( level );
10b20f: 51 push %ecx
10b210: 9d popf
_Event_sets_Post( event_in, &api->pending_events );
_Event_Surrender( the_thread );
10b211: 83 ec 0c sub $0xc,%esp
10b214: 50 push %eax
10b215: e8 1e 00 00 00 call 10b238 <_Event_Surrender>
_Thread_Enable_dispatch();
10b21a: e8 e9 27 00 00 call 10da08 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b21f: 83 c4 10 add $0x10,%esp
10b222: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b224: 8b 5d fc mov -0x4(%ebp),%ebx
10b227: c9 leave
10b228: c3 ret
10b229: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b22c: b8 04 00 00 00 mov $0x4,%eax
}
10b231: 8b 5d fc mov -0x4(%ebp),%ebx
10b234: c9 leave
10b235: c3 ret
0010d048 <rtems_extension_delete>:
#include <rtems/extension.h>
rtems_status_code rtems_extension_delete(
rtems_id id
)
{
10d048: 55 push %ebp
10d049: 89 e5 mov %esp,%ebp
10d04b: 53 push %ebx
10d04c: 83 ec 18 sub $0x18,%esp
Extension_Control *the_extension;
Objects_Locations location;
the_extension = _Extension_Get( id, &location );
10d04f: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Extension_Control *)
_Objects_Get( &_Extension_Information, id, location );
10d052: 50 push %eax
10d053: ff 75 08 pushl 0x8(%ebp)
10d056: 68 60 ac 12 00 push $0x12ac60
10d05b: e8 28 12 00 00 call 10e288 <_Objects_Get>
10d060: 89 c3 mov %eax,%ebx
switch ( location ) {
10d062: 83 c4 10 add $0x10,%esp
10d065: 8b 55 f4 mov -0xc(%ebp),%edx
10d068: 85 d2 test %edx,%edx
10d06a: 75 38 jne 10d0a4 <rtems_extension_delete+0x5c>
case OBJECTS_LOCAL:
_User_extensions_Remove_set( &the_extension->Extension );
10d06c: 83 ec 0c sub $0xc,%esp
10d06f: 8d 40 10 lea 0x10(%eax),%eax
10d072: 50 push %eax
10d073: e8 e4 29 00 00 call 10fa5c <_User_extensions_Remove_set>
_Objects_Close( &_Extension_Information, &the_extension->Object );
10d078: 59 pop %ecx
10d079: 58 pop %eax
10d07a: 53 push %ebx
10d07b: 68 60 ac 12 00 push $0x12ac60
10d080: e8 cb 0d 00 00 call 10de50 <_Objects_Close>
RTEMS_INLINE_ROUTINE void _Extension_Free (
Extension_Control *the_extension
)
{
_Objects_Free( &_Extension_Information, &the_extension->Object );
10d085: 58 pop %eax
10d086: 5a pop %edx
10d087: 53 push %ebx
10d088: 68 60 ac 12 00 push $0x12ac60
10d08d: e8 b6 10 00 00 call 10e148 <_Objects_Free>
_Extension_Free( the_extension );
_Thread_Enable_dispatch();
10d092: e8 79 1d 00 00 call 10ee10 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d097: 83 c4 10 add $0x10,%esp
10d09a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d09c: 8b 5d fc mov -0x4(%ebp),%ebx
10d09f: c9 leave
10d0a0: c3 ret
10d0a1: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d0a4: b8 04 00 00 00 mov $0x4,%eax
}
10d0a9: 8b 5d fc mov -0x4(%ebp),%ebx
10d0ac: c9 leave
10d0ad: c3 ret
0010802c <rtems_filesystem_dirname>:
int rtems_filesystem_dirname(
const char *pathname
)
{
10802c: 55 push %ebp
10802d: 89 e5 mov %esp,%ebp
10802f: 57 push %edi
108030: 56 push %esi
108031: 53 push %ebx
108032: 83 ec 0c sub $0xc,%esp
108035: 8b 5d 08 mov 0x8(%ebp),%ebx
int len = strlen( pathname );
108038: 31 c0 xor %eax,%eax
10803a: b9 ff ff ff ff mov $0xffffffff,%ecx
10803f: 89 df mov %ebx,%edi
108041: f2 ae repnz scas %es:(%edi),%al
108043: f7 d1 not %ecx
while ( len ) {
108045: 89 ce mov %ecx,%esi
108047: 4e dec %esi
108048: 75 06 jne 108050 <rtems_filesystem_dirname+0x24><== ALWAYS TAKEN
10804a: eb 19 jmp 108065 <rtems_filesystem_dirname+0x39><== NOT EXECUTED
10804c: 85 f6 test %esi,%esi
10804e: 74 15 je 108065 <rtems_filesystem_dirname+0x39>
len--;
108050: 4e dec %esi
if ( rtems_filesystem_is_separator( pathname[len] ) )
108051: 83 ec 0c sub $0xc,%esp
108054: 0f be 04 33 movsbl (%ebx,%esi,1),%eax
108058: 50 push %eax
108059: e8 02 0f 00 00 call 108f60 <rtems_filesystem_is_separator>
10805e: 83 c4 10 add $0x10,%esp
108061: 85 c0 test %eax,%eax
108063: 74 e7 je 10804c <rtems_filesystem_dirname+0x20>
break;
}
return len;
}
108065: 89 f0 mov %esi,%eax
108067: 8d 65 f4 lea -0xc(%ebp),%esp
10806a: 5b pop %ebx
10806b: 5e pop %esi
10806c: 5f pop %edi
10806d: c9 leave
10806e: c3 ret
0011010c <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
11010c: 55 push %ebp
11010d: 89 e5 mov %esp,%ebp
11010f: 83 ec 18 sub $0x18,%esp
110112: 8b 45 08 mov 0x8(%ebp),%eax
find_arg fa = {
110115: 89 45 f0 mov %eax,-0x10(%ebp)
110118: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
11011f: 85 c0 test %eax,%eax
110121: 74 19 je 11013c <rtems_filesystem_get_mount_handler+0x30><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
110123: 83 ec 08 sub $0x8,%esp
110126: 8d 45 f0 lea -0x10(%ebp),%eax
110129: 50 push %eax
11012a: 68 2c 00 11 00 push $0x11002c
11012f: e8 34 ff ff ff call 110068 <rtems_filesystem_iterate>
110134: 8b 45 f4 mov -0xc(%ebp),%eax
110137: 83 c4 10 add $0x10,%esp
}
return fa.mount_h;
}
11013a: c9 leave
11013b: c3 ret
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
11013c: 31 c0 xor %eax,%eax
rtems_filesystem_iterate( find_handler, &fa );
}
return fa.mount_h;
}
11013e: c9 leave <== NOT EXECUTED
11013f: c3 ret <== NOT EXECUTED
001102c8 <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)
{
1102c8: 55 push %ebp
1102c9: 89 e5 mov %esp,%ebp
1102cb: 57 push %edi
1102cc: 56 push %esi
1102cd: 53 push %ebx
1102ce: 83 ec 18 sub $0x18,%esp
1102d1: 8b 5d 0c mov 0xc(%ebp),%ebx
if (rtems_filesystem_is_separator(path[0])) {
1102d4: 8b 45 08 mov 0x8(%ebp),%eax
1102d7: 0f be 00 movsbl (%eax),%eax
1102da: 50 push %eax
1102db: e8 80 8c ff ff call 108f60 <rtems_filesystem_is_separator>
1102e0: 83 c4 10 add $0x10,%esp
1102e3: 85 c0 test %eax,%eax
1102e5: 75 11 jne 1102f8 <rtems_filesystem_get_sym_start_loc+0x30>
*loc = rtems_filesystem_root;
*index = 1;
}
else {
*index = 0;
1102e7: c7 03 00 00 00 00 movl $0x0,(%ebx)
}
}
1102ed: 8d 65 f4 lea -0xc(%ebp),%esp
1102f0: 5b pop %ebx
1102f1: 5e pop %esi
1102f2: 5f pop %edi
1102f3: c9 leave
1102f4: c3 ret
1102f5: 8d 76 00 lea 0x0(%esi),%esi
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;
1102f8: 8b 35 50 5a 12 00 mov 0x125a50,%esi
1102fe: 83 c6 18 add $0x18,%esi
110301: b9 05 00 00 00 mov $0x5,%ecx
110306: 8b 7d 10 mov 0x10(%ebp),%edi
110309: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
*index = 1;
11030b: c7 03 01 00 00 00 movl $0x1,(%ebx)
}
else {
*index = 0;
}
}
110311: 8d 65 f4 lea -0xc(%ebp),%esp
110314: 5b pop %ebx
110315: 5e pop %esi
110316: 5f pop %edi
110317: c9 leave
110318: c3 ret
00107e5c <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 )
{
107e5c: 55 push %ebp
107e5d: 89 e5 mov %esp,%ebp
107e5f: 57 push %edi
107e60: 56 push %esi
107e61: 53 push %ebx
107e62: 83 ec 2c sub $0x2c,%esp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
107e65: a1 50 5a 12 00 mov 0x125a50,%eax
107e6a: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
107e71: a1 a0 f9 11 00 mov 0x11f9a0,%eax
107e76: 85 c0 test %eax,%eax
107e78: 0f 84 9f 00 00 00 je 107f1d <rtems_filesystem_initialize+0xc1><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
107e7e: a1 34 3a 12 00 mov 0x123a34,%eax
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
107e83: 83 ec 0c sub $0xc,%esp
107e86: 6a 00 push $0x0
107e88: ff 70 04 pushl 0x4(%eax)
107e8b: ff 30 pushl (%eax)
107e8d: ff 70 0c pushl 0xc(%eax)
107e90: ff 70 08 pushl 0x8(%eax)
107e93: e8 24 07 00 00 call 1085bc <mount>
if ( status == -1 )
107e98: 83 c4 20 add $0x20,%esp
107e9b: 40 inc %eax
107e9c: 0f 84 95 00 00 00 je 107f37 <rtems_filesystem_initialize+0xdb><== NEVER TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
107ea2: a1 50 5a 12 00 mov 0x125a50,%eax
107ea7: 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);
107ead: 83 ec 0c sub $0xc,%esp
107eb0: 6a 00 push $0x0
107eb2: 8d 5d d4 lea -0x2c(%ebp),%ebx
107eb5: 53 push %ebx
107eb6: 6a 00 push $0x0
107eb8: 6a 01 push $0x1
107eba: 68 c7 13 12 00 push $0x1213c7
107ebf: e8 24 01 00 00 call 107fe8 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
107ec4: 8b 3d 50 5a 12 00 mov 0x125a50,%edi
107eca: 83 c7 18 add $0x18,%edi
107ecd: b9 05 00 00 00 mov $0x5,%ecx
107ed2: 89 de mov %ebx,%esi
107ed4: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
107ed6: 83 c4 14 add $0x14,%esp
107ed9: 6a 00 push $0x0
107edb: 53 push %ebx
107edc: 6a 00 push $0x0
107ede: 6a 01 push $0x1
107ee0: 68 c7 13 12 00 push $0x1213c7
107ee5: e8 fe 00 00 00 call 107fe8 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
107eea: 8b 3d 50 5a 12 00 mov 0x125a50,%edi
107ef0: 83 c7 04 add $0x4,%edi
107ef3: b9 05 00 00 00 mov $0x5,%ecx
107ef8: 89 de mov %ebx,%esi
107efa: 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);
107efc: 83 c4 18 add $0x18,%esp
107eff: 68 ff 01 00 00 push $0x1ff
107f04: 68 c9 13 12 00 push $0x1213c9
107f09: e8 42 05 00 00 call 108450 <mkdir>
if ( status != 0 )
107f0e: 83 c4 10 add $0x10,%esp
107f11: 85 c0 test %eax,%eax
107f13: 75 15 jne 107f2a <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.
*/
}
107f15: 8d 65 f4 lea -0xc(%ebp),%esp
107f18: 5b pop %ebx
107f19: 5e pop %esi
107f1a: 5f pop %edi
107f1b: c9 leave
107f1c: c3 ret
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
107f1d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f20: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED
107f25: e8 12 3e 00 00 call 10bd3c <rtems_fatal_error_occurred><== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
107f2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f2d: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED
107f32: e8 05 3e 00 00 call 10bd3c <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 );
107f37: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
107f3a: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED
107f3f: e8 f8 3d 00 00 call 10bd3c <rtems_fatal_error_occurred><== NOT EXECUTED
00110068 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
110068: 55 push %ebp
110069: 89 e5 mov %esp,%ebp
11006b: 57 push %edi
11006c: 56 push %esi
11006d: 53 push %ebx
11006e: 83 ec 1c sub $0x1c,%esp
110071: 8b 75 08 mov 0x8(%ebp),%esi
110074: 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 ) {
110077: 8b 1d 80 f9 11 00 mov 0x11f980,%ebx
11007d: 85 db test %ebx,%ebx
11007f: 74 24 je 1100a5 <rtems_filesystem_iterate+0x3d><== NEVER TAKEN
110081: bb 80 f9 11 00 mov $0x11f980,%ebx
110086: eb 04 jmp 11008c <rtems_filesystem_iterate+0x24>
110088: 84 c0 test %al,%al
11008a: 75 70 jne 1100fc <rtems_filesystem_iterate+0x94>
stop = (*routine)( table_entry, routine_arg );
11008c: 83 ec 08 sub $0x8,%esp
11008f: 57 push %edi
110090: 53 push %ebx
110091: ff d6 call *%esi
110093: 88 c2 mov %al,%dl
++table_entry;
110095: 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 ) {
110098: 83 c4 10 add $0x10,%esp
11009b: 8b 0b mov (%ebx),%ecx
11009d: 85 c9 test %ecx,%ecx
11009f: 75 e7 jne 110088 <rtems_filesystem_iterate+0x20>
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
1100a1: 84 c0 test %al,%al
1100a3: 75 57 jne 1100fc <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 );
1100a5: 50 push %eax
1100a6: 6a 00 push $0x0
1100a8: 6a 00 push $0x0
1100aa: ff 35 e8 7c 12 00 pushl 0x127ce8
1100b0: e8 43 b6 ff ff call 10b6f8 <rtems_semaphore_obtain>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
1100b5: 8b 1d 78 5a 12 00 mov 0x125a78,%ebx
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
1100bb: 83 c4 10 add $0x10,%esp
1100be: 81 fb 7c 5a 12 00 cmp $0x125a7c,%ebx
1100c4: 75 06 jne 1100cc <rtems_filesystem_iterate+0x64>
1100c6: eb 3e jmp 110106 <rtems_filesystem_iterate+0x9e>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
1100c8: 84 c0 test %al,%al
1100ca: 75 19 jne 1100e5 <rtems_filesystem_iterate+0x7d><== NEVER TAKEN
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
1100cc: 83 ec 08 sub $0x8,%esp
1100cf: 57 push %edi
1100d0: 8d 43 08 lea 0x8(%ebx),%eax
1100d3: 50 push %eax
1100d4: ff d6 call *%esi
1100d6: 88 c2 mov %al,%dl
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
1100d8: 8b 1b mov (%ebx),%ebx
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
1100da: 83 c4 10 add $0x10,%esp
1100dd: 81 fb 7c 5a 12 00 cmp $0x125a7c,%ebx
1100e3: 75 e3 jne 1100c8 <rtems_filesystem_iterate+0x60>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
1100e5: 83 ec 0c sub $0xc,%esp
1100e8: ff 35 e8 7c 12 00 pushl 0x127ce8
1100ee: 88 55 e4 mov %dl,-0x1c(%ebp)
1100f1: e8 fe b6 ff ff call 10b7f4 <rtems_semaphore_release>
1100f6: 83 c4 10 add $0x10,%esp
1100f9: 8a 55 e4 mov -0x1c(%ebp),%dl
}
rtems_libio_unlock();
}
return stop;
}
1100fc: 88 d0 mov %dl,%al
1100fe: 8d 65 f4 lea -0xc(%ebp),%esp
110101: 5b pop %ebx
110102: 5e pop %esi
110103: 5f pop %edi
110104: c9 leave
110105: c3 ret
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
110106: 31 d2 xor %edx,%edx
110108: eb db jmp 1100e5 <rtems_filesystem_iterate+0x7d>
0010854c <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
10854c: 55 push %ebp
10854d: 89 e5 mov %esp,%ebp
10854f: 57 push %edi
108550: 56 push %esi
108551: 53 push %ebx
108552: 83 ec 20 sub $0x20,%esp
108555: 8b 75 08 mov 0x8(%ebp),%esi
108558: 8b 7d 0c mov 0xc(%ebp),%edi
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 );
10855b: 6a 00 push $0x0
10855d: 6a 00 push $0x0
10855f: ff 35 e8 7c 12 00 pushl 0x127ce8
108565: e8 8e 31 00 00 call 10b6f8 <rtems_semaphore_obtain>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
10856a: 8b 1d 24 59 12 00 mov 0x125924,%ebx
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
108570: 83 c4 10 add $0x10,%esp
108573: 81 fb 28 59 12 00 cmp $0x125928,%ebx
108579: 75 09 jne 108584 <rtems_filesystem_mount_iterate+0x38><== ALWAYS TAKEN
10857b: eb 3b jmp 1085b8 <rtems_filesystem_mount_iterate+0x6c><== NOT EXECUTED
10857d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
108580: 84 c0 test %al,%al
108582: 75 16 jne 10859a <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 );
108584: 83 ec 08 sub $0x8,%esp
108587: 57 push %edi
108588: 53 push %ebx
108589: ff d6 call *%esi
10858b: 88 c2 mov %al,%dl
}
rtems_libio_unlock();
return stop;
}
10858d: 8b 1b mov (%ebx),%ebx
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
10858f: 83 c4 10 add $0x10,%esp
108592: 81 fb 28 59 12 00 cmp $0x125928,%ebx
108598: 75 e6 jne 108580 <rtems_filesystem_mount_iterate+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10859a: 83 ec 0c sub $0xc,%esp
10859d: ff 35 e8 7c 12 00 pushl 0x127ce8
1085a3: 88 55 e4 mov %dl,-0x1c(%ebp)
1085a6: e8 49 32 00 00 call 10b7f4 <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
1085ab: 8a 55 e4 mov -0x1c(%ebp),%dl
1085ae: 88 d0 mov %dl,%al
1085b0: 8d 65 f4 lea -0xc(%ebp),%esp
1085b3: 5b pop %ebx
1085b4: 5e pop %esi
1085b5: 5f pop %edi
1085b6: c9 leave
1085b7: c3 ret
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
rtems_chain_node *node = NULL;
bool stop = false;
1085b8: 31 d2 xor %edx,%edx <== NOT EXECUTED
1085ba: eb de jmp 10859a <rtems_filesystem_mount_iterate+0x4e><== NOT EXECUTED
00108070 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
108070: 55 push %ebp
108071: 89 e5 mov %esp,%ebp
108073: 57 push %edi
108074: 56 push %esi
108075: 53 push %ebx
108076: 83 ec 0c sub $0xc,%esp
108079: 8b 75 08 mov 0x8(%ebp),%esi
10807c: 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 ) )
10807f: 8a 06 mov (%esi),%al
108081: 84 c0 test %al,%al
108083: 74 34 je 1080b9 <rtems_filesystem_prefix_separators+0x49><== NEVER TAKEN
108085: 85 ff test %edi,%edi
108087: 74 30 je 1080b9 <rtems_filesystem_prefix_separators+0x49><== NEVER TAKEN
108089: 31 db xor %ebx,%ebx
10808b: eb 0f jmp 10809c <rtems_filesystem_prefix_separators+0x2c>
10808d: 8d 76 00 lea 0x0(%esi),%esi
{
pathname++;
pathnamelen--;
stripped++;
108090: 43 inc %ebx
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
108091: 8a 04 1e mov (%esi,%ebx,1),%al
108094: 84 c0 test %al,%al
108096: 74 17 je 1080af <rtems_filesystem_prefix_separators+0x3f><== NEVER TAKEN
108098: 39 df cmp %ebx,%edi
10809a: 74 13 je 1080af <rtems_filesystem_prefix_separators+0x3f><== NEVER TAKEN
10809c: 83 ec 0c sub $0xc,%esp
10809f: 0f be c0 movsbl %al,%eax
1080a2: 50 push %eax
1080a3: e8 b8 0e 00 00 call 108f60 <rtems_filesystem_is_separator>
1080a8: 83 c4 10 add $0x10,%esp
1080ab: 85 c0 test %eax,%eax
1080ad: 75 e1 jne 108090 <rtems_filesystem_prefix_separators+0x20>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
1080af: 89 d8 mov %ebx,%eax
1080b1: 8d 65 f4 lea -0xc(%ebp),%esp
1080b4: 5b pop %ebx
1080b5: 5e pop %esi
1080b6: 5f pop %edi
1080b7: c9 leave
1080b8: c3 ret
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
1080b9: 31 db xor %ebx,%ebx
1080bb: eb f2 jmp 1080af <rtems_filesystem_prefix_separators+0x3f><== NOT EXECUTED
00110140 <rtems_filesystem_register>:
int
rtems_filesystem_register(
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
110140: 55 push %ebp
110141: 89 e5 mov %esp,%ebp
110143: 57 push %edi
110144: 56 push %esi
110145: 53 push %ebx
110146: 83 ec 28 sub $0x28,%esp
size_t type_size = strlen(type) + 1;
110149: 31 c0 xor %eax,%eax
11014b: b9 ff ff ff ff mov $0xffffffff,%ecx
110150: 8b 7d 08 mov 0x8(%ebp),%edi
110153: f2 ae repnz scas %es:(%edi),%al
110155: f7 d1 not %ecx
size_t fsn_size = sizeof( filesystem_node ) + type_size;
110157: 8d 41 10 lea 0x10(%ecx),%eax
filesystem_node *fsn = malloc( fsn_size );
11015a: 50 push %eax
11015b: 89 4d e4 mov %ecx,-0x1c(%ebp)
11015e: e8 45 82 ff ff call 1083a8 <malloc>
110163: 89 c3 mov %eax,%ebx
char *type_storage = (char *) fsn + sizeof( *fsn );
if ( fsn == NULL )
110165: 83 c4 10 add $0x10,%esp
110168: 85 c0 test %eax,%eax
11016a: 8b 4d e4 mov -0x1c(%ebp),%ecx
11016d: 0f 84 8e 00 00 00 je 110201 <rtems_filesystem_register+0xc1>
)
{
size_t type_size = strlen(type) + 1;
size_t fsn_size = sizeof( filesystem_node ) + type_size;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( *fsn );
110173: 8d 40 10 lea 0x10(%eax),%eax
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
memcpy(type_storage, type, type_size);
110176: 89 c7 mov %eax,%edi
110178: 8b 75 08 mov 0x8(%ebp),%esi
11017b: f3 a4 rep movsb %ds:(%esi),%es:(%edi)
fsn->entry.type = type_storage;
11017d: 89 43 08 mov %eax,0x8(%ebx)
fsn->entry.mount_h = mount_h;
110180: 8b 45 0c mov 0xc(%ebp),%eax
110183: 89 43 0c mov %eax,0xc(%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 );
110186: 50 push %eax
110187: 6a 00 push $0x0
110189: 6a 00 push $0x0
11018b: ff 35 e8 7c 12 00 pushl 0x127ce8
110191: e8 62 b5 ff ff call 10b6f8 <rtems_semaphore_obtain>
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
110196: 5f pop %edi
110197: ff 75 08 pushl 0x8(%ebp)
11019a: e8 6d ff ff ff call 11010c <rtems_filesystem_get_mount_handler>
11019f: 83 c4 10 add $0x10,%esp
1101a2: 85 c0 test %eax,%eax
1101a4: 75 2a jne 1101d0 <rtems_filesystem_register+0x90>
1101a6: 83 ec 08 sub $0x8,%esp
1101a9: 53 push %ebx
1101aa: 68 78 5a 12 00 push $0x125a78
1101af: e8 6c be ff ff call 10c020 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
1101b4: 5e pop %esi
1101b5: ff 35 e8 7c 12 00 pushl 0x127ce8
1101bb: e8 34 b6 ff ff call 10b7f4 <rtems_semaphore_release>
1101c0: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
1101c3: 31 c0 xor %eax,%eax
}
1101c5: 8d 65 f4 lea -0xc(%ebp),%esp
1101c8: 5b pop %ebx
1101c9: 5e pop %esi
1101ca: 5f pop %edi
1101cb: c9 leave
1101cc: c3 ret
1101cd: 8d 76 00 lea 0x0(%esi),%esi
1101d0: 83 ec 0c sub $0xc,%esp
1101d3: ff 35 e8 7c 12 00 pushl 0x127ce8
1101d9: e8 16 b6 ff ff call 10b7f4 <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 );
1101de: 89 1c 24 mov %ebx,(%esp)
1101e1: e8 ee 7e ff ff call 1080d4 <free>
rtems_set_errno_and_return_minus_one( EINVAL );
1101e6: e8 f9 30 00 00 call 1132e4 <__errno>
1101eb: c7 00 16 00 00 00 movl $0x16,(%eax)
1101f1: 83 c4 10 add $0x10,%esp
1101f4: b8 ff ff ff ff mov $0xffffffff,%eax
}
rtems_libio_unlock();
return 0;
}
1101f9: 8d 65 f4 lea -0xc(%ebp),%esp
1101fc: 5b pop %ebx
1101fd: 5e pop %esi
1101fe: 5f pop %edi
1101ff: c9 leave
110200: c3 ret
size_t fsn_size = sizeof( filesystem_node ) + type_size;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( *fsn );
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
110201: e8 de 30 00 00 call 1132e4 <__errno>
110206: c7 00 0c 00 00 00 movl $0xc,(%eax)
11020c: b8 ff ff ff ff mov $0xffffffff,%eax
110211: eb b2 jmp 1101c5 <rtems_filesystem_register+0x85>
00110214 <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
110214: 55 push %ebp
110215: 89 e5 mov %esp,%ebp
110217: 56 push %esi
110218: 53 push %ebx
110219: 8b 75 08 mov 0x8(%ebp),%esi
rtems_chain_node *node = NULL;
if ( type == NULL ) {
11021c: 85 f6 test %esi,%esi
11021e: 0f 84 94 00 00 00 je 1102b8 <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 );
110224: 51 push %ecx
110225: 6a 00 push $0x0
110227: 6a 00 push $0x0
110229: ff 35 e8 7c 12 00 pushl 0x127ce8
11022f: e8 c4 b4 ff ff call 10b6f8 <rtems_semaphore_obtain>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
110234: 8b 1d 78 5a 12 00 mov 0x125a78,%ebx
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
11023a: 83 c4 10 add $0x10,%esp
11023d: 81 fb 7c 5a 12 00 cmp $0x125a7c,%ebx
110243: 75 0d jne 110252 <rtems_filesystem_unregister+0x3e>
110245: eb 49 jmp 110290 <rtems_filesystem_unregister+0x7c>
110247: 90 nop
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
110248: 8b 1b mov (%ebx),%ebx
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
11024a: 81 fb 7c 5a 12 00 cmp $0x125a7c,%ebx
110250: 74 3e je 110290 <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 ) {
110252: 83 ec 08 sub $0x8,%esp
110255: 56 push %esi
110256: ff 73 08 pushl 0x8(%ebx)
110259: e8 fe 3c 00 00 call 113f5c <strcmp>
11025e: 83 c4 10 add $0x10,%esp
110261: 85 c0 test %eax,%eax
110263: 75 e3 jne 110248 <rtems_filesystem_unregister+0x34>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
110265: 83 ec 0c sub $0xc,%esp
110268: 53 push %ebx
110269: e8 d6 bd ff ff call 10c044 <_Chain_Extract>
rtems_chain_extract( node );
free( fsn );
11026e: 89 1c 24 mov %ebx,(%esp)
110271: e8 5e 7e ff ff call 1080d4 <free>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
110276: 5a pop %edx
110277: ff 35 e8 7c 12 00 pushl 0x127ce8
11027d: e8 72 b5 ff ff call 10b7f4 <rtems_semaphore_release>
110282: 83 c4 10 add $0x10,%esp
rtems_libio_unlock();
return 0;
110285: 31 c0 xor %eax,%eax
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
110287: 8d 65 f8 lea -0x8(%ebp),%esp
11028a: 5b pop %ebx
11028b: 5e pop %esi
11028c: c9 leave
11028d: c3 ret
11028e: 66 90 xchg %ax,%ax
110290: 83 ec 0c sub $0xc,%esp
110293: ff 35 e8 7c 12 00 pushl 0x127ce8
110299: e8 56 b5 ff ff call 10b7f4 <rtems_semaphore_release>
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
11029e: e8 41 30 00 00 call 1132e4 <__errno>
1102a3: c7 00 02 00 00 00 movl $0x2,(%eax)
1102a9: 83 c4 10 add $0x10,%esp
1102ac: b8 ff ff ff ff mov $0xffffffff,%eax
}
1102b1: 8d 65 f8 lea -0x8(%ebp),%esp
1102b4: 5b pop %ebx
1102b5: 5e pop %esi
1102b6: c9 leave
1102b7: c3 ret
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
1102b8: e8 27 30 00 00 call 1132e4 <__errno>
1102bd: c7 00 16 00 00 00 movl $0x16,(%eax)
1102c3: 83 c8 ff or $0xffffffff,%eax
1102c6: eb e9 jmp 1102b1 <rtems_filesystem_unregister+0x9d>
001089ac <rtems_gxx_key_create>:
int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *))
{
1089ac: 55 push %ebp
1089ad: 89 e5 mov %esp,%ebp
1089af: 56 push %esi
1089b0: 53 push %ebx
1089b1: 8b 75 0c mov 0xc(%ebp),%esi
* pointer to the buffer that will hold the value of the key itself.
* We have to to this, because the others functions on this interface
* deal with the value of the key, as used with the POSIX API.
*/
/* Do not pull your hair, trust me this works. :-) */
__gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) );
1089b4: 83 ec 0c sub $0xc,%esp
1089b7: 6a 08 push $0x8
1089b9: e8 c6 03 00 00 call 108d84 <malloc>
1089be: 89 c3 mov %eax,%ebx
*key = new_key;
1089c0: 8b 45 08 mov 0x8(%ebp),%eax
1089c3: 89 18 mov %ebx,(%eax)
new_key->val = NULL;
1089c5: c7 03 00 00 00 00 movl $0x0,(%ebx)
new_key->dtor = dtor;
1089cb: 89 73 04 mov %esi,0x4(%ebx)
"gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
1089ce: 83 c4 0c add $0xc,%esp
1089d1: 56 push %esi
1089d2: 53 push %ebx
1089d3: 6a 00 push $0x0
1089d5: e8 ce 3c 00 00 call 10c6a8 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL )
1089da: 83 c4 10 add $0x10,%esp
1089dd: 85 c0 test %eax,%eax
1089df: 75 0b jne 1089ec <rtems_gxx_key_create+0x40><== NEVER TAKEN
return 0;
1089e1: 31 c0 xor %eax,%eax
free( new_key );
return -1;
}
1089e3: 8d 65 f8 lea -0x8(%ebp),%esp
1089e6: 5b pop %ebx
1089e7: 5e pop %esi
1089e8: c9 leave
1089e9: c3 ret
1089ea: 66 90 xchg %ax,%ax
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor );
if ( status == RTEMS_SUCCESSFUL )
return 0;
free( new_key );
1089ec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1089ef: 53 push %ebx <== NOT EXECUTED
1089f0: e8 3f fe ff ff call 108834 <free> <== NOT EXECUTED
return -1;
1089f5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
1089f8: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
1089fd: eb e4 jmp 1089e3 <rtems_gxx_key_create+0x37><== NOT EXECUTED
00108a10 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
108a10: 55 push %ebp
108a11: 89 e5 mov %esp,%ebp
108a13: 53 push %ebx
108a14: 83 ec 0c sub $0xc,%esp
108a17: 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 );
108a1a: 53 push %ebx
108a1b: 6a 00 push $0x0
108a1d: e8 4a 3d 00 00 call 10c76c <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
108a22: 83 c4 10 add $0x10,%esp
108a25: 85 c0 test %eax,%eax
108a27: 75 11 jne 108a3a <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( *(void **)key );
108a29: 85 db test %ebx,%ebx
108a2b: 74 0d je 108a3a <rtems_gxx_key_delete+0x2a><== NEVER TAKEN
108a2d: 83 ec 0c sub $0xc,%esp
108a30: ff 33 pushl (%ebx)
108a32: e8 fd fd ff ff call 108834 <free>
108a37: 83 c4 10 add $0x10,%esp
return 0;
}
key = NULL;
return 0;
}
108a3a: 31 c0 xor %eax,%eax
108a3c: 8b 5d fc mov -0x4(%ebp),%ebx
108a3f: c9 leave
108a40: c3 ret
00108930 <rtems_gxx_once>:
/* uncomment this if you need to debug this interface */
/*#define DEBUG_GXX_WRAPPERS 1*/
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
108930: 55 push %ebp
108931: 89 e5 mov %esp,%ebp
108933: 56 push %esi
108934: 53 push %ebx
108935: 83 ec 10 sub $0x10,%esp
108938: 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 ) {
10893b: 8b 03 mov (%ebx),%eax
10893d: 85 c0 test %eax,%eax
10893f: 74 0b je 10894c <rtems_gxx_once+0x1c>
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
108941: 31 c0 xor %eax,%eax
108943: 8d 65 f8 lea -0x8(%ebp),%esp
108946: 5b pop %ebx
108947: 5e pop %esi
108948: c9 leave
108949: c3 ret
10894a: 66 90 xchg %ax,%ax
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
10894c: 51 push %ecx
10894d: 8d 75 f4 lea -0xc(%ebp),%esi
108950: 56 push %esi
108951: 68 00 01 00 00 push $0x100
108956: 68 00 01 00 00 push $0x100
10895b: e8 70 3b 00 00 call 10c4d0 <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
108960: 8b 03 mov (%ebx),%eax
108962: 83 c4 10 add $0x10,%esp
108965: 85 c0 test %eax,%eax
108967: 75 27 jne 108990 <rtems_gxx_once+0x60> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
108969: c7 03 01 00 00 00 movl $0x1,(%ebx)
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
10896f: 52 push %edx
108970: 56 push %esi
108971: 68 00 01 00 00 push $0x100
108976: ff 75 f4 pushl -0xc(%ebp)
108979: e8 52 3b 00 00 call 10c4d0 <rtems_task_mode>
if ( o == 0 )
(*func)();
10897e: ff 55 0c call *0xc(%ebp)
108981: 83 c4 10 add $0x10,%esp
}
return 0;
}
108984: 31 c0 xor %eax,%eax
108986: 8d 65 f8 lea -0x8(%ebp),%esp
108989: 5b pop %ebx
10898a: 5e pop %esi
10898b: c9 leave
10898c: c3 ret
10898d: 8d 76 00 lea 0x0(%esi),%esi
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);
108990: 50 push %eax <== NOT EXECUTED
108991: 56 push %esi <== NOT EXECUTED
108992: 68 00 01 00 00 push $0x100 <== NOT EXECUTED
108997: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED
10899a: e8 31 3b 00 00 call 10c4d0 <rtems_task_mode> <== NOT EXECUTED
10899f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if ( o == 0 )
(*func)();
}
return 0;
}
1089a2: 31 c0 xor %eax,%eax <== NOT EXECUTED
1089a4: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
1089a7: 5b pop %ebx <== NOT EXECUTED
1089a8: 5e pop %esi <== NOT EXECUTED
1089a9: c9 leave <== NOT EXECUTED
1089aa: c3 ret <== NOT EXECUTED
00108aa0 <rtems_gxx_setspecific>:
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
108aa0: 55 push %ebp
108aa1: 89 e5 mov %esp,%ebp
108aa3: 53 push %ebx
108aa4: 83 ec 08 sub $0x8,%esp
108aa7: 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 );
108aaa: ff 73 04 pushl 0x4(%ebx)
108aad: 53 push %ebx
108aae: 6a 00 push $0x0
108ab0: e8 f3 3b 00 00 call 10c6a8 <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
108ab5: 83 c4 10 add $0x10,%esp
108ab8: 85 c0 test %eax,%eax
108aba: 75 0c jne 108ac8 <rtems_gxx_setspecific+0x28><== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
108abc: 8b 45 0c mov 0xc(%ebp),%eax
108abf: 89 03 mov %eax,(%ebx)
return 0;
108ac1: 31 c0 xor %eax,%eax
}
return -1;
}
108ac3: 8b 5d fc mov -0x4(%ebp),%ebx
108ac6: c9 leave
108ac7: c3 ret
if ( status == RTEMS_SUCCESSFUL ) {
/* now let's set the proper value */
key->val = (void *)ptr;
return 0;
}
return -1;
108ac8: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
}
108acd: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
108ad0: c9 leave <== NOT EXECUTED
108ad1: c3 ret <== NOT EXECUTED
0010bce0 <rtems_heap_allocate_aligned_with_boundary>:
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
10bce0: 55 push %ebp
10bce1: 89 e5 mov %esp,%ebp
10bce3: 83 ec 08 sub $0x8,%esp
if (
10bce6: 83 3d 40 f0 12 00 03 cmpl $0x3,0x12f040
10bced: 74 21 je 10bd10 <rtems_heap_allocate_aligned_with_boundary+0x30><== ALWAYS TAKEN
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
10bcef: e8 b8 ef ff ff call 10acac <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
10bcf4: ff 75 10 pushl 0x10(%ebp)
10bcf7: ff 75 0c pushl 0xc(%ebp)
10bcfa: ff 75 08 pushl 0x8(%ebp)
10bcfd: ff 35 90 a1 12 00 pushl 0x12a190
10bd03: e8 14 4e 00 00 call 110b1c <_Protected_heap_Allocate_aligned_with_boundary>
10bd08: 83 c4 10 add $0x10,%esp
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
10bd0b: c9 leave
10bd0c: c3 ret
10bd0d: 8d 76 00 lea 0x0(%esi),%esi
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
10bd10: e8 57 ef ff ff call 10ac6c <malloc_is_system_state_OK>
10bd15: 84 c0 test %al,%al
10bd17: 75 d6 jne 10bcef <rtems_heap_allocate_aligned_with_boundary+0xf>
) {
return NULL;
10bd19: 31 c0 xor %eax,%eax
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
10bd1b: c9 leave
10bd1c: c3 ret
00112fc8 <rtems_io_close>:
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
112fc8: 55 push %ebp
112fc9: 89 e5 mov %esp,%ebp
112fcb: 53 push %ebx
112fcc: 83 ec 04 sub $0x4,%esp
112fcf: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
112fd2: 39 05 c0 88 12 00 cmp %eax,0x1288c0
112fd8: 76 1a jbe 112ff4 <rtems_io_close+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
112fda: 8d 14 40 lea (%eax,%eax,2),%edx
112fdd: c1 e2 03 shl $0x3,%edx
112fe0: 03 15 c4 88 12 00 add 0x1288c4,%edx
112fe6: 8b 52 08 mov 0x8(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
112fe9: 85 d2 test %edx,%edx
112feb: 74 13 je 113000 <rtems_io_close+0x38>
}
112fed: 59 pop %ecx
112fee: 5b pop %ebx
112fef: 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;
112ff0: ff e2 jmp *%edx
112ff2: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
112ff4: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
112ff9: 5a pop %edx
112ffa: 5b pop %ebx
112ffb: c9 leave
112ffc: c3 ret
112ffd: 8d 76 00 lea 0x0(%esi),%esi
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;
113000: 31 c0 xor %eax,%eax
}
113002: 5a pop %edx
113003: 5b pop %ebx
113004: c9 leave
113005: c3 ret
00113008 <rtems_io_control>:
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
113008: 55 push %ebp
113009: 89 e5 mov %esp,%ebp
11300b: 53 push %ebx
11300c: 83 ec 04 sub $0x4,%esp
11300f: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
113012: 39 05 c0 88 12 00 cmp %eax,0x1288c0
113018: 76 1a jbe 113034 <rtems_io_control+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
11301a: 8d 14 40 lea (%eax,%eax,2),%edx
11301d: c1 e2 03 shl $0x3,%edx
113020: 03 15 c4 88 12 00 add 0x1288c4,%edx
113026: 8b 52 14 mov 0x14(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113029: 85 d2 test %edx,%edx
11302b: 74 13 je 113040 <rtems_io_control+0x38>
}
11302d: 59 pop %ecx
11302e: 5b pop %ebx
11302f: 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;
113030: ff e2 jmp *%edx
113032: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
113034: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
113039: 5a pop %edx
11303a: 5b pop %ebx
11303b: c9 leave
11303c: c3 ret
11303d: 8d 76 00 lea 0x0(%esi),%esi
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;
113040: 31 c0 xor %eax,%eax
}
113042: 5a pop %edx
113043: 5b pop %ebx
113044: c9 leave
113045: c3 ret
001110a4 <rtems_io_initialize>:
rtems_status_code rtems_io_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
1110a4: 55 push %ebp
1110a5: 89 e5 mov %esp,%ebp
1110a7: 53 push %ebx
1110a8: 83 ec 04 sub $0x4,%esp
1110ab: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
1110ae: 39 05 c0 88 12 00 cmp %eax,0x1288c0
1110b4: 76 1a jbe 1110d0 <rtems_io_initialize+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
1110b6: 8d 14 40 lea (%eax,%eax,2),%edx
1110b9: c1 e2 03 shl $0x3,%edx
1110bc: 03 15 c4 88 12 00 add 0x1288c4,%edx
1110c2: 8b 12 mov (%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1110c4: 85 d2 test %edx,%edx
1110c6: 74 14 je 1110dc <rtems_io_initialize+0x38>
}
1110c8: 59 pop %ecx
1110c9: 5b pop %ebx
1110ca: 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;
1110cb: ff e2 jmp *%edx
1110cd: 8d 76 00 lea 0x0(%esi),%esi
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
1110d0: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
1110d5: 5a pop %edx
1110d6: 5b pop %ebx
1110d7: c9 leave
1110d8: c3 ret
1110d9: 8d 76 00 lea 0x0(%esi),%esi
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;
1110dc: 31 c0 xor %eax,%eax
}
1110de: 5a pop %edx
1110df: 5b pop %ebx
1110e0: c9 leave
1110e1: c3 ret
00107d80 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
107d80: 55 push %ebp
107d81: 89 e5 mov %esp,%ebp
107d83: 57 push %edi
107d84: 56 push %esi
107d85: 53 push %ebx
107d86: 83 ec 48 sub $0x48,%esp
107d89: 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(
107d8c: b9 ff ff ff ff mov $0xffffffff,%ecx
107d91: 89 f7 mov %esi,%edi
107d93: 31 c0 xor %eax,%eax
107d95: f2 ae repnz scas %es:(%edi),%al
107d97: f7 d1 not %ecx
107d99: 49 dec %ecx
107d9a: 6a 01 push $0x1
107d9c: 8d 5d d4 lea -0x2c(%ebp),%ebx
107d9f: 53 push %ebx
107da0: 6a 00 push $0x0
107da2: 51 push %ecx
107da3: 56 push %esi
107da4: e8 3f 02 00 00 call 107fe8 <rtems_filesystem_evaluate_path>
107da9: 89 c7 mov %eax,%edi
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
107dab: 8b 55 d4 mov -0x2c(%ebp),%edx
107dae: 89 55 c4 mov %edx,-0x3c(%ebp)
node_type = (*loc.ops->node_type_h)( &loc );
107db1: 83 c4 14 add $0x14,%esp
107db4: 53 push %ebx
107db5: 8b 45 e0 mov -0x20(%ebp),%eax
107db8: ff 50 10 call *0x10(%eax)
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
107dbb: 83 c4 10 add $0x10,%esp
107dbe: 85 ff test %edi,%edi
107dc0: 75 05 jne 107dc7 <rtems_io_lookup_name+0x47><== NEVER TAKEN
107dc2: 83 f8 02 cmp $0x2,%eax
107dc5: 74 19 je 107de0 <rtems_io_lookup_name+0x60>
rtems_filesystem_freenode( &loc );
107dc7: 83 ec 0c sub $0xc,%esp
107dca: 53 push %ebx
107dcb: e8 f0 02 00 00 call 1080c0 <rtems_filesystem_freenode>
return RTEMS_UNSATISFIED;
107dd0: 83 c4 10 add $0x10,%esp
107dd3: b8 0d 00 00 00 mov $0xd,%eax
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
107dd8: 8d 65 f4 lea -0xc(%ebp),%esp
107ddb: 5b pop %ebx
107ddc: 5e pop %esi
107ddd: 5f pop %edi
107dde: c9 leave
107ddf: c3 ret
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
107de0: 8b 7d 0c mov 0xc(%ebp),%edi
107de3: 89 37 mov %esi,(%edi)
device_info->device_name_length = strlen( name );
107de5: b9 ff ff ff ff mov $0xffffffff,%ecx
107dea: 89 f7 mov %esi,%edi
107dec: 31 c0 xor %eax,%eax
107dee: f2 ae repnz scas %es:(%edi),%al
107df0: f7 d1 not %ecx
107df2: 49 dec %ecx
107df3: 8b 45 0c mov 0xc(%ebp),%eax
107df6: 89 48 04 mov %ecx,0x4(%eax)
device_info->major = the_jnode->info.device.major;
107df9: 8b 55 c4 mov -0x3c(%ebp),%edx
107dfc: 8b 42 50 mov 0x50(%edx),%eax
107dff: 8b 7d 0c mov 0xc(%ebp),%edi
107e02: 89 47 08 mov %eax,0x8(%edi)
device_info->minor = the_jnode->info.device.minor;
107e05: 8b 42 54 mov 0x54(%edx),%eax
107e08: 89 47 0c mov %eax,0xc(%edi)
rtems_filesystem_freenode( &loc );
107e0b: 83 ec 0c sub $0xc,%esp
107e0e: 53 push %ebx
107e0f: e8 ac 02 00 00 call 1080c0 <rtems_filesystem_freenode>
return RTEMS_SUCCESSFUL;
107e14: 83 c4 10 add $0x10,%esp
107e17: 31 c0 xor %eax,%eax
107e19: eb bd jmp 107dd8 <rtems_io_lookup_name+0x58>
00113048 <rtems_io_open>:
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
113048: 55 push %ebp
113049: 89 e5 mov %esp,%ebp
11304b: 53 push %ebx
11304c: 83 ec 04 sub $0x4,%esp
11304f: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
113052: 39 05 c0 88 12 00 cmp %eax,0x1288c0
113058: 76 1a jbe 113074 <rtems_io_open+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
11305a: 8d 14 40 lea (%eax,%eax,2),%edx
11305d: c1 e2 03 shl $0x3,%edx
113060: 03 15 c4 88 12 00 add 0x1288c4,%edx
113066: 8b 52 04 mov 0x4(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
113069: 85 d2 test %edx,%edx
11306b: 74 13 je 113080 <rtems_io_open+0x38>
}
11306d: 59 pop %ecx
11306e: 5b pop %ebx
11306f: 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;
113070: ff e2 jmp *%edx
113072: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
113074: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
113079: 5a pop %edx
11307a: 5b pop %ebx
11307b: c9 leave
11307c: c3 ret
11307d: 8d 76 00 lea 0x0(%esi),%esi
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;
113080: 31 c0 xor %eax,%eax
}
113082: 5a pop %edx
113083: 5b pop %ebx
113084: c9 leave
113085: c3 ret
00113088 <rtems_io_read>:
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
113088: 55 push %ebp
113089: 89 e5 mov %esp,%ebp
11308b: 53 push %ebx
11308c: 83 ec 04 sub $0x4,%esp
11308f: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
113092: 39 05 c0 88 12 00 cmp %eax,0x1288c0
113098: 76 1a jbe 1130b4 <rtems_io_read+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
11309a: 8d 14 40 lea (%eax,%eax,2),%edx
11309d: c1 e2 03 shl $0x3,%edx
1130a0: 03 15 c4 88 12 00 add 0x1288c4,%edx
1130a6: 8b 52 0c mov 0xc(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1130a9: 85 d2 test %edx,%edx
1130ab: 74 13 je 1130c0 <rtems_io_read+0x38>
}
1130ad: 59 pop %ecx
1130ae: 5b pop %ebx
1130af: 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;
1130b0: ff e2 jmp *%edx
1130b2: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
1130b4: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
1130b9: 5a pop %edx
1130ba: 5b pop %ebx
1130bb: c9 leave
1130bc: c3 ret
1130bd: 8d 76 00 lea 0x0(%esi),%esi
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;
1130c0: 31 c0 xor %eax,%eax
}
1130c2: 5a pop %edx
1130c3: 5b pop %ebx
1130c4: c9 leave
1130c5: c3 ret
0010cf18 <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
)
{
10cf18: 55 push %ebp
10cf19: 89 e5 mov %esp,%ebp
10cf1b: 57 push %edi
10cf1c: 56 push %esi
10cf1d: 53 push %ebx
10cf1e: 83 ec 0c sub $0xc,%esp
10cf21: 8b 5d 08 mov 0x8(%ebp),%ebx
10cf24: 8b 75 0c mov 0xc(%ebp),%esi
10cf27: 8b 55 10 mov 0x10(%ebp),%edx
rtems_device_major_number major_limit = _IO_Number_of_drivers;
10cf2a: a1 c0 c5 12 00 mov 0x12c5c0,%eax
if ( rtems_interrupt_is_in_progress() )
10cf2f: 8b 0d f4 c0 12 00 mov 0x12c0f4,%ecx
10cf35: 85 c9 test %ecx,%ecx
10cf37: 0f 85 ab 00 00 00 jne 10cfe8 <rtems_io_register_driver+0xd0>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
10cf3d: 85 d2 test %edx,%edx
10cf3f: 0f 84 e7 00 00 00 je 10d02c <rtems_io_register_driver+0x114>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
10cf45: 89 02 mov %eax,(%edx)
if ( driver_table == NULL )
10cf47: 85 f6 test %esi,%esi
10cf49: 0f 84 dd 00 00 00 je 10d02c <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;
10cf4f: 8b 3e mov (%esi),%edi
10cf51: 85 ff test %edi,%edi
10cf53: 0f 84 c7 00 00 00 je 10d020 <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 )
10cf59: 39 d8 cmp %ebx,%eax
10cf5b: 76 7b jbe 10cfd8 <rtems_io_register_driver+0xc0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10cf5d: a1 50 bb 12 00 mov 0x12bb50,%eax
10cf62: 40 inc %eax
10cf63: a3 50 bb 12 00 mov %eax,0x12bb50
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
10cf68: 85 db test %ebx,%ebx
10cf6a: 0f 85 88 00 00 00 jne 10cff8 <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;
10cf70: 8b 0d c0 c5 12 00 mov 0x12c5c0,%ecx
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
10cf76: 85 c9 test %ecx,%ecx
10cf78: 0f 84 bb 00 00 00 je 10d039 <rtems_io_register_driver+0x121><== NEVER TAKEN
10cf7e: 8b 3d c4 c5 12 00 mov 0x12c5c4,%edi
10cf84: 89 f8 mov %edi,%eax
10cf86: eb 08 jmp 10cf90 <rtems_io_register_driver+0x78>
10cf88: 43 inc %ebx
10cf89: 83 c0 18 add $0x18,%eax
10cf8c: 39 d9 cmp %ebx,%ecx
10cf8e: 76 0b jbe 10cf9b <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;
10cf90: 83 38 00 cmpl $0x0,(%eax)
10cf93: 75 f3 jne 10cf88 <rtems_io_register_driver+0x70>
10cf95: 83 78 04 00 cmpl $0x0,0x4(%eax)
10cf99: 75 ed jne 10cf88 <rtems_io_register_driver+0x70>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10cf9b: 89 1a mov %ebx,(%edx)
if ( m != n )
10cf9d: 39 d9 cmp %ebx,%ecx
10cf9f: 0f 84 9b 00 00 00 je 10d040 <rtems_io_register_driver+0x128>
10cfa5: 8d 04 5b lea (%ebx,%ebx,2),%eax
10cfa8: c1 e0 03 shl $0x3,%eax
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
10cfab: 01 c7 add %eax,%edi
10cfad: b9 06 00 00 00 mov $0x6,%ecx
10cfb2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
_Thread_Enable_dispatch();
10cfb4: e8 7b 1d 00 00 call 10ed34 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
10cfb9: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp)
10cfc0: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp)
10cfc7: 89 5d 08 mov %ebx,0x8(%ebp)
}
10cfca: 83 c4 0c add $0xc,%esp
10cfcd: 5b pop %ebx
10cfce: 5e pop %esi
10cfcf: 5f pop %edi
10cfd0: c9 leave
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
10cfd1: e9 7a 7e 00 00 jmp 114e50 <rtems_io_initialize>
10cfd6: 66 90 xchg %ax,%ax
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
10cfd8: 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 );
}
10cfdd: 83 c4 0c add $0xc,%esp
10cfe0: 5b pop %ebx
10cfe1: 5e pop %esi
10cfe2: 5f pop %edi
10cfe3: c9 leave
10cfe4: c3 ret
10cfe5: 8d 76 00 lea 0x0(%esi),%esi
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
10cfe8: 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 );
}
10cfed: 83 c4 0c add $0xc,%esp
10cff0: 5b pop %ebx
10cff1: 5e pop %esi
10cff2: 5f pop %edi
10cff3: c9 leave
10cff4: c3 ret
10cff5: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
10cff8: 8d 04 5b lea (%ebx,%ebx,2),%eax
10cffb: c1 e0 03 shl $0x3,%eax
10cffe: 8b 0d c4 c5 12 00 mov 0x12c5c4,%ecx
10d004: 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;
10d006: 8b 39 mov (%ecx),%edi
10d008: 85 ff test %edi,%edi
10d00a: 74 40 je 10d04c <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();
10d00c: e8 23 1d 00 00 call 10ed34 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10d011: 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 );
}
10d016: 83 c4 0c add $0xc,%esp
10d019: 5b pop %ebx
10d01a: 5e pop %esi
10d01b: 5f pop %edi
10d01c: c9 leave
10d01d: c3 ret
10d01e: 66 90 xchg %ax,%ax
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
10d020: 8b 4e 04 mov 0x4(%esi),%ecx
10d023: 85 c9 test %ecx,%ecx
10d025: 0f 85 2e ff ff ff jne 10cf59 <rtems_io_register_driver+0x41>
10d02b: 90 nop
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
10d02c: 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 );
}
10d031: 83 c4 0c add $0xc,%esp
10d034: 5b pop %ebx
10d035: 5e pop %esi
10d036: 5f pop %edi
10d037: c9 leave
10d038: c3 ret
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
10d039: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED
10d03f: 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();
10d040: e8 ef 1c 00 00 call 10ed34 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
10d045: 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;
10d04a: eb 91 jmp 10cfdd <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;
10d04c: 8b 49 04 mov 0x4(%ecx),%ecx
10d04f: 85 c9 test %ecx,%ecx
10d051: 75 b9 jne 10d00c <rtems_io_register_driver+0xf4>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
10d053: 89 1a mov %ebx,(%edx)
10d055: 8b 3d c4 c5 12 00 mov 0x12c5c4,%edi
10d05b: e9 4b ff ff ff jmp 10cfab <rtems_io_register_driver+0x93>
0010d060 <rtems_io_unregister_driver>:
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
10d060: 55 push %ebp
10d061: 89 e5 mov %esp,%ebp
10d063: 57 push %edi
10d064: 83 ec 04 sub $0x4,%esp
10d067: 8b 45 08 mov 0x8(%ebp),%eax
if ( rtems_interrupt_is_in_progress() )
10d06a: 8b 0d f4 c0 12 00 mov 0x12c0f4,%ecx
10d070: 85 c9 test %ecx,%ecx
10d072: 75 44 jne 10d0b8 <rtems_io_unregister_driver+0x58>
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
10d074: 39 05 c0 c5 12 00 cmp %eax,0x12c5c0
10d07a: 77 0c ja 10d088 <rtems_io_unregister_driver+0x28>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
10d07c: b8 0d 00 00 00 mov $0xd,%eax
}
10d081: 5a pop %edx
10d082: 5f pop %edi
10d083: c9 leave
10d084: c3 ret
10d085: 8d 76 00 lea 0x0(%esi),%esi
10d088: 8b 15 50 bb 12 00 mov 0x12bb50,%edx
10d08e: 42 inc %edx
10d08f: 89 15 50 bb 12 00 mov %edx,0x12bb50
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
&_IO_Driver_address_table[major],
10d095: 8d 14 40 lea (%eax,%eax,2),%edx
10d098: 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(
10d09b: 03 15 c4 c5 12 00 add 0x12c5c4,%edx
10d0a1: b9 18 00 00 00 mov $0x18,%ecx
10d0a6: 31 c0 xor %eax,%eax
10d0a8: 89 d7 mov %edx,%edi
10d0aa: f3 aa rep stos %al,%es:(%edi)
&_IO_Driver_address_table[major],
0,
sizeof( rtems_driver_address_table )
);
_Thread_Enable_dispatch();
10d0ac: e8 83 1c 00 00 call 10ed34 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d0b1: 31 c0 xor %eax,%eax
}
return RTEMS_UNSATISFIED;
}
10d0b3: 5a pop %edx
10d0b4: 5f pop %edi
10d0b5: c9 leave
10d0b6: c3 ret
10d0b7: 90 nop
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
10d0b8: b8 12 00 00 00 mov $0x12,%eax
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
10d0bd: 5a pop %edx
10d0be: 5f pop %edi
10d0bf: c9 leave
10d0c0: c3 ret
001130c8 <rtems_io_write>:
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
1130c8: 55 push %ebp
1130c9: 89 e5 mov %esp,%ebp
1130cb: 53 push %ebx
1130cc: 83 ec 04 sub $0x4,%esp
1130cf: 8b 45 08 mov 0x8(%ebp),%eax
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
1130d2: 39 05 c0 88 12 00 cmp %eax,0x1288c0
1130d8: 76 1a jbe 1130f4 <rtems_io_write+0x2c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
1130da: 8d 14 40 lea (%eax,%eax,2),%edx
1130dd: c1 e2 03 shl $0x3,%edx
1130e0: 03 15 c4 88 12 00 add 0x1288c4,%edx
1130e6: 8b 52 10 mov 0x10(%edx),%edx
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
1130e9: 85 d2 test %edx,%edx
1130eb: 74 13 je 113100 <rtems_io_write+0x38>
}
1130ed: 59 pop %ecx
1130ee: 5b pop %ebx
1130ef: 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;
1130f0: ff e2 jmp *%edx
1130f2: 66 90 xchg %ax,%ax
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
1130f4: b8 0a 00 00 00 mov $0xa,%eax
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
1130f9: 5a pop %edx
1130fa: 5b pop %ebx
1130fb: c9 leave
1130fc: c3 ret
1130fd: 8d 76 00 lea 0x0(%esi),%esi
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;
113100: 31 c0 xor %eax,%eax
}
113102: 5a pop %edx
113103: 5b pop %ebx
113104: c9 leave
113105: 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 49 je 10e06d <rtems_iterate_over_all_threads+0x59><== NEVER TAKEN
10e024: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp)
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
10e02b: 8b 55 e4 mov -0x1c(%ebp),%edx
10e02e: 8b 04 95 68 ba 12 00 mov 0x12ba68(,%edx,4),%eax
10e035: 8b 70 04 mov 0x4(%eax),%esi
if ( !information )
10e038: 85 f6 test %esi,%esi
10e03a: 74 28 je 10e064 <rtems_iterate_over_all_threads+0x50>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e03c: 66 83 7e 10 00 cmpw $0x0,0x10(%esi)
10e041: 74 21 je 10e064 <rtems_iterate_over_all_threads+0x50>
10e043: bb 01 00 00 00 mov $0x1,%ebx
the_thread = (Thread_Control *)information->local_table[ i ];
10e048: 8b 46 1c mov 0x1c(%esi),%eax
10e04b: 8b 04 98 mov (%eax,%ebx,4),%eax
if ( !the_thread )
10e04e: 85 c0 test %eax,%eax
10e050: 74 09 je 10e05b <rtems_iterate_over_all_threads+0x47><== NEVER TAKEN
continue;
(*routine)(the_thread);
10e052: 83 ec 0c sub $0xc,%esp
10e055: 50 push %eax
10e056: ff d7 call *%edi
10e058: 83 c4 10 add $0x10,%esp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
10e05b: 43 inc %ebx
10e05c: 0f b7 46 10 movzwl 0x10(%esi),%eax
10e060: 39 d8 cmp %ebx,%eax
10e062: 73 e4 jae 10e048 <rtems_iterate_over_all_threads+0x34>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
10e064: ff 45 e4 incl -0x1c(%ebp)
10e067: 83 7d e4 04 cmpl $0x4,-0x1c(%ebp)
10e06b: 75 be jne 10e02b <rtems_iterate_over_all_threads+0x17>
(*routine)(the_thread);
}
}
}
10e06d: 8d 65 f4 lea -0xc(%ebp),%esp
10e070: 5b pop %ebx
10e071: 5e pop %esi
10e072: 5f pop %edi
10e073: c9 leave
10e074: c3 ret
0010ff0c <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
10ff0c: 55 push %ebp
10ff0d: 89 e5 mov %esp,%ebp
10ff0f: 53 push %ebx
10ff10: 83 ec 08 sub $0x8,%esp
10ff13: 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 );
10ff16: 6a 00 push $0x0
10ff18: 6a 00 push $0x0
10ff1a: ff 35 e8 7c 12 00 pushl 0x127ce8
10ff20: e8 d3 b7 ff ff call 10b6f8 <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
10ff25: 8b 43 2c mov 0x2c(%ebx),%eax
10ff28: 83 c4 10 add $0x10,%esp
10ff2b: 85 c0 test %eax,%eax
10ff2d: 74 0c je 10ff3b <rtems_libio_free+0x2f> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
10ff2f: 83 ec 0c sub $0xc,%esp
10ff32: 50 push %eax
10ff33: e8 1c b7 ff ff call 10b654 <rtems_semaphore_delete>
10ff38: 83 c4 10 add $0x10,%esp
iop->flags &= ~LIBIO_FLAGS_OPEN;
10ff3b: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx)
iop->data1 = rtems_libio_iop_freelist;
10ff42: a1 e4 7c 12 00 mov 0x127ce4,%eax
10ff47: 89 43 34 mov %eax,0x34(%ebx)
rtems_libio_iop_freelist = iop;
10ff4a: 89 1d e4 7c 12 00 mov %ebx,0x127ce4
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10ff50: a1 e8 7c 12 00 mov 0x127ce8,%eax
10ff55: 89 45 08 mov %eax,0x8(%ebp)
rtems_libio_unlock();
}
10ff58: 8b 5d fc mov -0x4(%ebp),%ebx
10ff5b: c9 leave
10ff5c: e9 93 b8 ff ff jmp 10b7f4 <rtems_semaphore_release>
001081d0 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
1081d0: 55 push %ebp
1081d1: 89 e5 mov %esp,%ebp
1081d3: 53 push %ebx
1081d4: 83 ec 04 sub $0x4,%esp
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
1081d7: 8b 1d 2c 3a 12 00 mov 0x123a2c,%ebx
1081dd: 85 db test %ebx,%ebx
1081df: 74 50 je 108231 <rtems_libio_init+0x61> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
1081e1: 83 ec 08 sub $0x8,%esp
1081e4: 6a 38 push $0x38
1081e6: 53 push %ebx
1081e7: e8 58 fd ff ff call 107f44 <calloc>
1081ec: 89 c2 mov %eax,%edx
1081ee: a3 e0 7c 12 00 mov %eax,0x127ce0
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
1081f3: 83 c4 10 add $0x10,%esp
1081f6: 85 c0 test %eax,%eax
1081f8: 74 74 je 10826e <rtems_libio_init+0x9e>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
1081fa: a3 e4 7c 12 00 mov %eax,0x127ce4
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
1081ff: 83 fb 01 cmp $0x1,%ebx
108202: 76 26 jbe 10822a <rtems_libio_init+0x5a> <== NEVER TAKEN
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
108204: 8d 50 38 lea 0x38(%eax),%edx
108207: 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;
10820c: 89 52 fc mov %edx,-0x4(%edx)
10820f: 41 inc %ecx
108210: 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++)
108213: 39 d9 cmp %ebx,%ecx
108215: 75 f5 jne 10820c <rtems_libio_init+0x3c>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
108217: 8d 0c cd f8 ff ff ff lea -0x8(,%ecx,8),%ecx
10821e: 8d 14 cd 00 00 00 00 lea 0x0(,%ecx,8),%edx
108225: 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++)
108227: 8d 14 10 lea (%eax,%edx,1),%edx
iop->data1 = iop + 1;
iop->data1 = NULL;
10822a: 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(
108231: 83 ec 0c sub $0xc,%esp
108234: 68 e8 7c 12 00 push $0x127ce8
108239: 6a 00 push $0x0
10823b: 6a 54 push $0x54
10823d: 6a 01 push $0x1
10823f: 68 4f 49 42 4c push $0x4c42494f
108244: e8 33 32 00 00 call 10b47c <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
108249: 83 c4 20 add $0x20,%esp
10824c: 85 c0 test %eax,%eax
10824e: 75 15 jne 108265 <rtems_libio_init+0x95> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
108250: a1 28 3a 12 00 mov 0x123a28,%eax
108255: 85 c0 test %eax,%eax
108257: 74 07 je 108260 <rtems_libio_init+0x90> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
108259: 8b 5d fc mov -0x4(%ebp),%ebx
10825c: c9 leave
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
10825d: ff e0 jmp *%eax
10825f: 90 nop
}
108260: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
108263: c9 leave <== NOT EXECUTED
108264: 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 );
108265: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
108268: 50 push %eax <== NOT EXECUTED
108269: e8 ce 3a 00 00 call 10bd3c <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);
10826e: 83 ec 0c sub $0xc,%esp
108271: 6a 1a push $0x1a
108273: e8 c4 3a 00 00 call 10bd3c <rtems_fatal_error_occurred>
0010ffc8 <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
10ffc8: 55 push %ebp
10ffc9: 89 e5 mov %esp,%ebp
10ffcb: 53 push %ebx
10ffcc: 83 ec 08 sub $0x8,%esp
10ffcf: 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 );
10ffd2: 6a 00 push $0x0
10ffd4: 6a 00 push $0x0
10ffd6: ff 35 e8 7c 12 00 pushl 0x127ce8
10ffdc: e8 17 b7 ff ff call 10b6f8 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10ffe1: a1 e0 7c 12 00 mov 0x127ce0,%eax
10ffe6: 8b 0d 2c 3a 12 00 mov 0x123a2c,%ecx
10ffec: 83 c4 10 add $0x10,%esp
10ffef: 85 c9 test %ecx,%ecx
10fff1: 74 18 je 11000b <rtems_libio_is_file_open+0x43><== NEVER TAKEN
10fff3: 31 d2 xor %edx,%edx
10fff5: eb 04 jmp 10fffb <rtems_libio_is_file_open+0x33>
10fff7: 90 nop
10fff8: 83 c0 38 add $0x38,%eax
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
10fffb: f6 40 15 01 testb $0x1,0x15(%eax)
10ffff: 74 05 je 110006 <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 ) {
110001: 39 58 18 cmp %ebx,0x18(%eax)
110004: 74 1e je 110024 <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++){
110006: 42 inc %edx
110007: 39 ca cmp %ecx,%edx
110009: 72 ed jb 10fff8 <rtems_libio_is_file_open+0x30>
int rtems_libio_is_file_open(
void *node_access
)
{
rtems_libio_t *iop;
int result=0;
11000b: 31 db xor %ebx,%ebx
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
11000d: 83 ec 0c sub $0xc,%esp
110010: ff 35 e8 7c 12 00 pushl 0x127ce8
110016: e8 d9 b7 ff ff call 10b7f4 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
11001b: 89 d8 mov %ebx,%eax
11001d: 8b 5d fc mov -0x4(%ebp),%ebx
110020: c9 leave
110021: c3 ret
110022: 66 90 xchg %ax,%ax
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
result = 1;
110024: bb 01 00 00 00 mov $0x1,%ebx
110029: eb e2 jmp 11000d <rtems_libio_is_file_open+0x45>
0010ff64 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
10ff64: 55 push %ebp
10ff65: 89 e5 mov %esp,%ebp
10ff67: 53 push %ebx
10ff68: 83 ec 08 sub $0x8,%esp
10ff6b: 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 );
10ff6e: 6a 00 push $0x0
10ff70: 6a 00 push $0x0
10ff72: ff 35 e8 7c 12 00 pushl 0x127ce8
10ff78: e8 7b b7 ff ff call 10b6f8 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
10ff7d: a1 e0 7c 12 00 mov 0x127ce0,%eax
10ff82: 8b 0d 2c 3a 12 00 mov 0x123a2c,%ecx
10ff88: 83 c4 10 add $0x10,%esp
10ff8b: 85 c9 test %ecx,%ecx
10ff8d: 74 18 je 10ffa7 <rtems_libio_is_open_files_in_fs+0x43><== NEVER TAKEN
10ff8f: 31 d2 xor %edx,%edx
10ff91: eb 04 jmp 10ff97 <rtems_libio_is_open_files_in_fs+0x33>
10ff93: 90 nop
10ff94: 83 c0 38 add $0x38,%eax
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
10ff97: f6 40 15 01 testb $0x1,0x15(%eax)
10ff9b: 74 05 je 10ffa2 <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 ) {
10ff9d: 39 58 28 cmp %ebx,0x28(%eax)
10ffa0: 74 1e je 10ffc0 <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++){
10ffa2: 42 inc %edx
10ffa3: 39 ca cmp %ecx,%edx
10ffa5: 72 ed jb 10ff94 <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;
10ffa7: 31 db xor %ebx,%ebx
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10ffa9: 83 ec 0c sub $0xc,%esp
10ffac: ff 35 e8 7c 12 00 pushl 0x127ce8
10ffb2: e8 3d b8 ff ff call 10b7f4 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
10ffb7: 89 d8 mov %ebx,%eax
10ffb9: 8b 5d fc mov -0x4(%ebp),%ebx
10ffbc: c9 leave
10ffbd: c3 ret
10ffbe: 66 90 xchg %ax,%ax
* 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;
10ffc0: bb 01 00 00 00 mov $0x1,%ebx
10ffc5: eb e2 jmp 10ffa9 <rtems_libio_is_open_files_in_fs+0x45>
001095e8 <rtems_libio_set_private_env>:
rtems_status_code rtems_libio_set_private_env(void)
{
1095e8: 55 push %ebp
1095e9: 89 e5 mov %esp,%ebp
1095eb: 57 push %edi
1095ec: 56 push %esi
1095ed: 53 push %ebx
1095ee: 83 ec 5c sub $0x5c,%esp
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_id task_id = rtems_task_self();
1095f1: e8 0e 2e 00 00 call 10c404 <rtems_task_self>
1095f6: 89 45 b4 mov %eax,-0x4c(%ebp)
rtems_filesystem_location_info_t root_loc;
rtems_filesystem_location_info_t current_loc;
rtems_user_env_t *new_env = NULL;
int rv = 0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
1095f9: 83 ec 0c sub $0xc,%esp
1095fc: 6a 00 push $0x0
1095fe: 8d 5d d4 lea -0x2c(%ebp),%ebx
109601: 53 push %ebx
109602: 6a 00 push $0x0
109604: 6a 01 push $0x1
109606: 68 07 1d 12 00 push $0x121d07
10960b: e8 28 ee ff ff call 108438 <rtems_filesystem_evaluate_path>
if (rv != 0)
109610: 83 c4 20 add $0x20,%esp
109613: 85 c0 test %eax,%eax
109615: 74 0d je 109624 <rtems_libio_set_private_env+0x3c><== ALWAYS TAKEN
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
109617: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED
}
10961c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10961f: 5b pop %ebx <== NOT EXECUTED
109620: 5e pop %esi <== NOT EXECUTED
109621: 5f pop %edi <== NOT EXECUTED
109622: c9 leave <== NOT EXECUTED
109623: c3 ret <== NOT EXECUTED
rv = rtems_filesystem_evaluate_path("/", 1, 0, &root_loc, 0);
if (rv != 0)
goto error_0;
rv = rtems_filesystem_evaluate_path("/", 1, 0, ¤t_loc, 0);
109624: 83 ec 0c sub $0xc,%esp
109627: 6a 00 push $0x0
109629: 8d 45 c0 lea -0x40(%ebp),%eax
10962c: 89 45 a4 mov %eax,-0x5c(%ebp)
10962f: 50 push %eax
109630: 6a 00 push $0x0
109632: 6a 01 push $0x1
109634: 68 07 1d 12 00 push $0x121d07
109639: e8 fa ed ff ff call 108438 <rtems_filesystem_evaluate_path>
if (rv != 0)
10963e: 83 c4 20 add $0x20,%esp
109641: 85 c0 test %eax,%eax
109643: 0f 85 9a 00 00 00 jne 1096e3 <rtems_libio_set_private_env+0xfb><== NEVER TAKEN
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
rtems_current_user_env == &rtems_global_user_env
109649: 8b 15 90 63 12 00 mov 0x126390,%edx
/*
* Bharath: I'm not sure if the check can be reduced to
* if( rtems_current_user_env->task_id != task_id ) {
*/
if (
10964f: 81 fa 80 86 12 00 cmp $0x128680,%edx
109655: 74 07 je 10965e <rtems_libio_set_private_env+0x76>
rtems_current_user_env == &rtems_global_user_env
|| rtems_current_user_env->task_id != task_id
109657: 8b 45 b4 mov -0x4c(%ebp),%eax
10965a: 39 02 cmp %eax,(%edx)
10965c: 74 3a je 109698 <rtems_libio_set_private_env+0xb0>
) {
new_env = malloc(sizeof(rtems_user_env_t));
10965e: 83 ec 0c sub $0xc,%esp
109661: 6a 48 push $0x48
109663: e8 ec f3 ff ff call 108a54 <malloc>
109668: 89 c2 mov %eax,%edx
10966a: 89 c6 mov %eax,%esi
if (new_env == NULL)
10966c: 83 c4 10 add $0x10,%esp
10966f: 85 c0 test %eax,%eax
109671: 74 61 je 1096d4 <rtems_libio_set_private_env+0xec>
#ifdef HAVE_USERENV_REFCNT
new_env->refcnt = 1;
#endif
sc = rtems_task_variable_add(
109673: 50 push %eax
109674: 68 a8 95 10 00 push $0x1095a8
109679: 68 90 63 12 00 push $0x126390
10967e: 6a 00 push $0x0
109680: 89 55 b0 mov %edx,-0x50(%ebp)
109683: e8 00 2e 00 00 call 10c488 <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL)
109688: 83 c4 10 add $0x10,%esp
10968b: 85 c0 test %eax,%eax
10968d: 8b 55 b0 mov -0x50(%ebp),%edx
109690: 75 36 jne 1096c8 <rtems_libio_set_private_env+0xe0>
goto error_3;
rtems_current_user_env = new_env;
109692: 89 15 90 63 12 00 mov %edx,0x126390
}
/* Inherit the global values */
*rtems_current_user_env = rtems_global_user_env;
109698: be 80 86 12 00 mov $0x128680,%esi
10969d: b9 12 00 00 00 mov $0x12,%ecx
1096a2: 89 d7 mov %edx,%edi
1096a4: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_current_user_env->task_id = task_id;
1096a6: 8b 75 b4 mov -0x4c(%ebp),%esi
1096a9: 89 32 mov %esi,(%edx)
* Clone the pathlocs. In contrast to most other code we must _not_ free the
* original locs because 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_root = root_loc;
1096ab: 8d 7a 18 lea 0x18(%edx),%edi
1096ae: b1 05 mov $0x5,%cl
1096b0: 89 de mov %ebx,%esi
1096b2: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
rtems_filesystem_current = current_loc;
1096b4: 8d 7a 04 lea 0x4(%edx),%edi
1096b7: b1 05 mov $0x5,%cl
1096b9: 8b 75 a4 mov -0x5c(%ebp),%esi
1096bc: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
return RTEMS_SUCCESSFUL;
1096be: 31 c0 xor %eax,%eax
error_1:
rtems_filesystem_freenode(&root_loc);
error_0:
return RTEMS_NO_MEMORY;
}
1096c0: 8d 65 f4 lea -0xc(%ebp),%esp
1096c3: 5b pop %ebx
1096c4: 5e pop %esi
1096c5: 5f pop %edi
1096c6: c9 leave
1096c7: c3 ret
rtems_filesystem_current = current_loc;
return RTEMS_SUCCESSFUL;
error_3:
free(new_env);
1096c8: 83 ec 0c sub $0xc,%esp
1096cb: 56 push %esi
1096cc: e8 53 ee ff ff call 108524 <free>
1096d1: 83 c4 10 add $0x10,%esp
error_2:
rtems_filesystem_freenode(¤t_loc);
1096d4: 83 ec 0c sub $0xc,%esp
1096d7: 8d 45 c0 lea -0x40(%ebp),%eax
1096da: 50 push %eax
1096db: e8 30 ee ff ff call 108510 <rtems_filesystem_freenode>
1096e0: 83 c4 10 add $0x10,%esp
error_1:
rtems_filesystem_freenode(&root_loc);
1096e3: 83 ec 0c sub $0xc,%esp
1096e6: 53 push %ebx
1096e7: e8 24 ee ff ff call 108510 <rtems_filesystem_freenode>
1096ec: 83 c4 10 add $0x10,%esp
error_0:
return RTEMS_NO_MEMORY;
1096ef: b8 1a 00 00 00 mov $0x1a,%eax
}
1096f4: 8d 65 f4 lea -0xc(%ebp),%esp
1096f7: 5b pop %ebx
1096f8: 5e pop %esi
1096f9: 5f pop %edi
1096fa: c9 leave
1096fb: c3 ret
001096fc <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
1096fc: 55 push %ebp
1096fd: 89 e5 mov %esp,%ebp
1096ff: 56 push %esi
109700: 53 push %ebx
109701: 83 ec 20 sub $0x20,%esp
109704: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_id current_task_id;
/*
* get current task id
*/
current_task_id = rtems_task_self();
109707: e8 f8 2c 00 00 call 10c404 <rtems_task_self>
10970c: 89 c6 mov %eax,%esi
/*
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
10970e: 39 c3 cmp %eax,%ebx
109710: 74 32 je 109744 <rtems_libio_share_private_env+0x48><== NEVER TAKEN
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
109712: 52 push %edx
task_id,
(void*)&rtems_current_user_env,
(void*)&shared_user_env );
109713: 8d 45 f4 lea -0xc(%ebp),%eax
if( task_id == current_task_id )
return RTEMS_SUCCESSFUL;
/*
* Try to get the requested user environment
*/
sc = rtems_task_variable_get(
109716: 50 push %eax
109717: 68 90 63 12 00 push $0x126390
10971c: 53 push %ebx
10971d: e8 2a 2e 00 00 call 10c54c <rtems_task_variable_get>
(void*)&shared_user_env );
/*
* If it was not successful, return the error code
*/
if (sc != RTEMS_SUCCESSFUL)
109722: 83 c4 10 add $0x10,%esp
109725: 85 c0 test %eax,%eax
109727: 75 13 jne 10973c <rtems_libio_share_private_env+0x40>
* If we have a current environment in place, we need to
* free it, since we will be sharing the variable with the
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
109729: 8b 15 90 63 12 00 mov 0x126390,%edx
10972f: 39 32 cmp %esi,(%edx)
109731: 74 1d je 109750 <rtems_libio_share_private_env+0x54>
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
}
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
109733: 8b 55 f4 mov -0xc(%ebp),%edx
109736: 89 15 90 63 12 00 mov %edx,0x126390
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
10973c: 8d 65 f8 lea -0x8(%ebp),%esp
10973f: 5b pop %ebx
109740: 5e pop %esi
109741: c9 leave
109742: c3 ret
109743: 90 nop
* If this was an attempt to share the task with self,
* if somebody wanted to do it... Lets tell them, its shared
*/
if( task_id == current_task_id )
return RTEMS_SUCCESSFUL;
109744: 31 c0 xor %eax,%eax
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
}
109746: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
109749: 5b pop %ebx <== NOT EXECUTED
10974a: 5e pop %esi <== NOT EXECUTED
10974b: c9 leave <== NOT EXECUTED
10974c: c3 ret <== NOT EXECUTED
10974d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
* shared_user_env
*/
if (rtems_current_user_env->task_id==current_task_id) {
rtems_user_env_t *tmp = rtems_current_user_env;
free_user_env( tmp );
109750: 83 ec 0c sub $0xc,%esp
109753: 52 push %edx
109754: 89 45 e4 mov %eax,-0x1c(%ebp)
109757: e8 4c fe ff ff call 1095a8 <free_user_env>
10975c: 83 c4 10 add $0x10,%esp
10975f: 8b 45 e4 mov -0x1c(%ebp),%eax
109762: eb cf jmp 109733 <rtems_libio_share_private_env+0x37>
0010fe24 <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
10fe24: 55 push %ebp
10fe25: 89 e5 mov %esp,%ebp
10fe27: 8b 55 08 mov 0x8(%ebp),%edx
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
10fe2a: 89 d0 mov %edx,%eax
10fe2c: 83 e0 06 and $0x6,%eax
10fe2f: 83 f8 06 cmp $0x6,%eax
10fe32: 74 2c je 10fe60 <rtems_libio_to_fcntl_flags+0x3c>
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
10fe34: f6 c2 02 test $0x2,%dl
10fe37: 75 23 jne 10fe5c <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;
10fe39: 31 c0 xor %eax,%eax
10fe3b: f6 c2 04 test $0x4,%dl <== NOT EXECUTED
10fe3e: 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 ) {
10fe41: f6 c2 01 test $0x1,%dl
10fe44: 74 03 je 10fe49 <rtems_libio_to_fcntl_flags+0x25>
fcntl_flags |= O_NONBLOCK;
10fe46: 80 cc 40 or $0x40,%ah
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
10fe49: f6 c6 02 test $0x2,%dh
10fe4c: 74 03 je 10fe51 <rtems_libio_to_fcntl_flags+0x2d>
fcntl_flags |= O_APPEND;
10fe4e: 83 c8 08 or $0x8,%eax
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
10fe51: 80 e6 04 and $0x4,%dh
10fe54: 74 03 je 10fe59 <rtems_libio_to_fcntl_flags+0x35>
fcntl_flags |= O_CREAT;
10fe56: 80 cc 02 or $0x2,%ah
}
return fcntl_flags;
}
10fe59: c9 leave
10fe5a: c3 ret
10fe5b: 90 nop
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
fcntl_flags |= O_RDONLY;
10fe5c: 31 c0 xor %eax,%eax
10fe5e: eb e1 jmp 10fe41 <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;
10fe60: b8 02 00 00 00 mov $0x2,%eax
10fe65: eb da jmp 10fe41 <rtems_libio_to_fcntl_flags+0x1d>
0010af90 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
10af90: 55 push %ebp
10af91: 89 e5 mov %esp,%ebp
10af93: 83 ec 1c sub $0x1c,%esp
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
10af96: 8d 45 f4 lea -0xc(%ebp),%eax
10af99: 50 push %eax
10af9a: ff 75 08 pushl 0x8(%ebp)
10af9d: ff 35 90 a1 12 00 pushl 0x12a190
10afa3: e8 1c 5c 00 00 call 110bc4 <_Protected_heap_Get_block_size>
10afa8: 83 c4 10 add $0x10,%esp
10afab: 84 c0 test %al,%al
10afad: 74 11 je 10afc0 <rtems_malloc_statistics_at_free+0x30><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
10afaf: 8b 45 f4 mov -0xc(%ebp),%eax
10afb2: 31 d2 xor %edx,%edx
10afb4: 01 05 84 ed 12 00 add %eax,0x12ed84
10afba: 11 15 88 ed 12 00 adc %edx,0x12ed88
}
}
10afc0: c9 leave
10afc1: c3 ret
0010afc4 <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
10afc4: 55 push %ebp
10afc5: 89 e5 mov %esp,%ebp
10afc7: 83 ec 18 sub $0x18,%esp
10afca: 8b 45 08 mov 0x8(%ebp),%eax
uintptr_t actual_size = 0;
10afcd: 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 )
10afd4: 85 c0 test %eax,%eax
10afd6: 74 43 je 10b01b <rtems_malloc_statistics_at_malloc+0x57><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
10afd8: 52 push %edx
10afd9: 8d 55 f4 lea -0xc(%ebp),%edx
10afdc: 52 push %edx
10afdd: 50 push %eax
10afde: ff 35 90 a1 12 00 pushl 0x12a190
10afe4: e8 db 5b 00 00 call 110bc4 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
10afe9: 8b 45 f4 mov -0xc(%ebp),%eax
10afec: 31 d2 xor %edx,%edx
10afee: 03 05 7c ed 12 00 add 0x12ed7c,%eax
10aff4: 13 15 80 ed 12 00 adc 0x12ed80,%edx
10affa: a3 7c ed 12 00 mov %eax,0x12ed7c
10afff: 89 15 80 ed 12 00 mov %edx,0x12ed80
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
10b005: 2b 05 84 ed 12 00 sub 0x12ed84,%eax
if (current_depth > s->max_depth)
10b00b: 83 c4 10 add $0x10,%esp
10b00e: 3b 05 78 ed 12 00 cmp 0x12ed78,%eax
10b014: 76 05 jbe 10b01b <rtems_malloc_statistics_at_malloc+0x57>
s->max_depth = current_depth;
10b016: a3 78 ed 12 00 mov %eax,0x12ed78
}
10b01b: c9 leave
10b01c: c3 ret
00113e28 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
113e28: 55 push %ebp
113e29: 89 e5 mov %esp,%ebp
113e2b: 53 push %ebx
113e2c: 83 ec 14 sub $0x14,%esp
113e2f: 8b 5d 08 mov 0x8(%ebp),%ebx
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
113e32: 85 db test %ebx,%ebx
113e34: 74 5b je 113e91 <rtems_memalign+0x69>
return EINVAL;
*pointer = NULL;
113e36: 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()) &&
113e3c: 83 3d e0 bc 12 00 03 cmpl $0x3,0x12bce0
113e43: 74 43 je 113e88 <rtems_memalign+0x60> <== ALWAYS TAKEN
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
113e45: e8 46 53 ff ff call 109190 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
113e4a: 6a 00 push $0x0
113e4c: ff 75 0c pushl 0xc(%ebp)
113e4f: ff 75 10 pushl 0x10(%ebp)
113e52: ff 35 b0 76 12 00 pushl 0x1276b0
113e58: e8 93 a5 ff ff call 10e3f0 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
113e5d: 83 c4 10 add $0x10,%esp
113e60: 85 c0 test %eax,%eax
113e62: 74 38 je 113e9c <rtems_memalign+0x74>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
113e64: 8b 15 08 9d 12 00 mov 0x129d08,%edx
113e6a: 85 d2 test %edx,%edx
113e6c: 74 10 je 113e7e <rtems_memalign+0x56>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
113e6e: 83 ec 0c sub $0xc,%esp
113e71: 53 push %ebx
113e72: 89 45 f4 mov %eax,-0xc(%ebp)
113e75: ff 52 04 call *0x4(%edx)
113e78: 83 c4 10 add $0x10,%esp
113e7b: 8b 45 f4 mov -0xc(%ebp),%eax
*pointer = return_this;
113e7e: 89 03 mov %eax,(%ebx)
return 0;
113e80: 31 c0 xor %eax,%eax
}
113e82: 8b 5d fc mov -0x4(%ebp),%ebx
113e85: c9 leave
113e86: c3 ret
113e87: 90 nop
/*
* 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() )
113e88: e8 c3 52 ff ff call 109150 <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()) &&
113e8d: 84 c0 test %al,%al
113e8f: 75 b4 jne 113e45 <rtems_memalign+0x1d> <== ALWAYS TAKEN
!malloc_is_system_state_OK() )
return EINVAL;
113e91: 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;
}
113e96: 8b 5d fc mov -0x4(%ebp),%ebx
113e99: c9 leave
113e9a: c3 ret
113e9b: 90 nop
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
113e9c: b8 0c 00 00 00 mov $0xc,%eax
113ea1: eb df jmp 113e82 <rtems_memalign+0x5a>
00116404 <rtems_message_queue_broadcast>:
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
116404: 55 push %ebp
116405: 89 e5 mov %esp,%ebp
116407: 57 push %edi
116408: 56 push %esi
116409: 53 push %ebx
11640a: 83 ec 1c sub $0x1c,%esp
11640d: 8b 7d 08 mov 0x8(%ebp),%edi
116410: 8b 5d 0c mov 0xc(%ebp),%ebx
116413: 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 )
116416: 85 db test %ebx,%ebx
116418: 74 62 je 11647c <rtems_message_queue_broadcast+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !count )
11641a: 85 f6 test %esi,%esi
11641c: 74 5e je 11647c <rtems_message_queue_broadcast+0x78>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
11641e: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
11641f: 8d 45 e4 lea -0x1c(%ebp),%eax
116422: 50 push %eax
116423: 57 push %edi
116424: 68 e0 34 14 00 push $0x1434e0
116429: e8 0a 4f 00 00 call 11b338 <_Objects_Get>
switch ( location ) {
11642e: 83 c4 10 add $0x10,%esp
116431: 8b 55 e4 mov -0x1c(%ebp),%edx
116434: 85 d2 test %edx,%edx
116436: 74 10 je 116448 <rtems_message_queue_broadcast+0x44>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116438: b8 04 00 00 00 mov $0x4,%eax
}
11643d: 8d 65 f4 lea -0xc(%ebp),%esp
116440: 5b pop %ebx
116441: 5e pop %esi
116442: 5f pop %edi
116443: c9 leave
116444: c3 ret
116445: 8d 76 00 lea 0x0(%esi),%esi
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
116448: 83 ec 08 sub $0x8,%esp
11644b: 56 push %esi
11644c: 6a 00 push $0x0
11644e: 57 push %edi
11644f: ff 75 10 pushl 0x10(%ebp)
116452: 53 push %ebx
116453: 83 c0 14 add $0x14,%eax
116456: 50 push %eax
116457: e8 c8 34 00 00 call 119924 <_CORE_message_queue_Broadcast>
11645c: 89 c3 mov %eax,%ebx
NULL,
#endif
count
);
_Thread_Enable_dispatch();
11645e: 83 c4 20 add $0x20,%esp
116461: e8 5a 5a 00 00 call 11bec0 <_Thread_Enable_dispatch>
return
116466: 83 ec 0c sub $0xc,%esp
116469: 53 push %ebx
11646a: e8 69 03 00 00 call 1167d8 <_Message_queue_Translate_core_message_queue_return_code>
11646f: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116472: 8d 65 f4 lea -0xc(%ebp),%esp
116475: 5b pop %ebx
116476: 5e pop %esi
116477: 5f pop %edi
116478: c9 leave
116479: c3 ret
11647a: 66 90 xchg %ax,%ax
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !count )
return RTEMS_INVALID_ADDRESS;
11647c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116481: 8d 65 f4 lea -0xc(%ebp),%esp
116484: 5b pop %ebx
116485: 5e pop %esi
116486: 5f pop %edi
116487: c9 leave
116488: c3 ret
001138a0 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
1138a0: 55 push %ebp
1138a1: 89 e5 mov %esp,%ebp
1138a3: 57 push %edi
1138a4: 56 push %esi
1138a5: 53 push %ebx
1138a6: 83 ec 2c sub $0x2c,%esp
1138a9: 8b 5d 08 mov 0x8(%ebp),%ebx
1138ac: 8b 75 0c mov 0xc(%ebp),%esi
1138af: 8b 4d 10 mov 0x10(%ebp),%ecx
1138b2: 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 ) )
1138b5: 85 db test %ebx,%ebx
1138b7: 74 2f je 1138e8 <rtems_message_queue_create+0x48>
return RTEMS_INVALID_NAME;
if ( !id )
1138b9: 85 ff test %edi,%edi
1138bb: 0f 84 a3 00 00 00 je 113964 <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 )
1138c1: 85 f6 test %esi,%esi
1138c3: 74 13 je 1138d8 <rtems_message_queue_create+0x38>
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
1138c5: 85 c9 test %ecx,%ecx
1138c7: 75 2f jne 1138f8 <rtems_message_queue_create+0x58>
return RTEMS_INVALID_SIZE;
1138c9: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1138ce: 8d 65 f4 lea -0xc(%ebp),%esp
1138d1: 5b pop %ebx
1138d2: 5e pop %esi
1138d3: 5f pop %edi
1138d4: c9 leave
1138d5: c3 ret
1138d6: 66 90 xchg %ax,%ax
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
return RTEMS_INVALID_NUMBER;
1138d8: b8 0a 00 00 00 mov $0xa,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1138dd: 8d 65 f4 lea -0xc(%ebp),%esp
1138e0: 5b pop %ebx
1138e1: 5e pop %esi
1138e2: 5f pop %edi
1138e3: c9 leave
1138e4: c3 ret
1138e5: 8d 76 00 lea 0x0(%esi),%esi
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
1138e8: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1138ed: 8d 65 f4 lea -0xc(%ebp),%esp
1138f0: 5b pop %ebx
1138f1: 5e pop %esi
1138f2: 5f pop %edi
1138f3: c9 leave
1138f4: c3 ret
1138f5: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
1138f8: a1 30 07 13 00 mov 0x130730,%eax
1138fd: 40 inc %eax
1138fe: a3 30 07 13 00 mov %eax,0x130730
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
113903: 89 4d d4 mov %ecx,-0x2c(%ebp)
113906: e8 21 60 00 00 call 11992c <_Message_queue_Allocate>
11390b: 89 c2 mov %eax,%edx
if ( !the_message_queue ) {
11390d: 85 c0 test %eax,%eax
11390f: 8b 4d d4 mov -0x2c(%ebp),%ecx
113912: 74 7c je 113990 <rtems_message_queue_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
113914: 8b 45 14 mov 0x14(%ebp),%eax
113917: 89 42 10 mov %eax,0x10(%edx)
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
11391a: a8 04 test $0x4,%al
11391c: 0f 95 c0 setne %al
11391f: 0f b6 c0 movzbl %al,%eax
113922: 89 45 e4 mov %eax,-0x1c(%ebp)
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
113925: 51 push %ecx
113926: 56 push %esi
113927: 8d 45 e4 lea -0x1c(%ebp),%eax
11392a: 50 push %eax
11392b: 8d 42 14 lea 0x14(%edx),%eax
11392e: 50 push %eax
11392f: 89 55 d4 mov %edx,-0x2c(%ebp)
113932: e8 2d 11 00 00 call 114a64 <_CORE_message_queue_Initialize>
113937: 83 c4 10 add $0x10,%esp
11393a: 84 c0 test %al,%al
11393c: 8b 55 d4 mov -0x2c(%ebp),%edx
11393f: 75 2f jne 113970 <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 );
113941: 83 ec 08 sub $0x8,%esp
113944: 52 push %edx
113945: 68 20 11 13 00 push $0x131120
11394a: e8 b1 1f 00 00 call 115900 <_Objects_Free>
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
11394f: e8 f4 2c 00 00 call 116648 <_Thread_Enable_dispatch>
return RTEMS_UNSATISFIED;
113954: 83 c4 10 add $0x10,%esp
113957: b8 0d 00 00 00 mov $0xd,%eax
11395c: e9 6d ff ff ff jmp 1138ce <rtems_message_queue_create+0x2e>
113961: 8d 76 00 lea 0x0(%esi),%esi
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
113964: b8 09 00 00 00 mov $0x9,%eax
113969: e9 60 ff ff ff jmp 1138ce <rtems_message_queue_create+0x2e>
11396e: 66 90 xchg %ax,%ax
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
113970: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
113973: 0f b7 f0 movzwl %ax,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
113976: 8b 0d 3c 11 13 00 mov 0x13113c,%ecx
11397c: 89 14 b1 mov %edx,(%ecx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
11397f: 89 5a 0c mov %ebx,0xc(%edx)
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
113982: 89 07 mov %eax,(%edi)
name,
0
);
#endif
_Thread_Enable_dispatch();
113984: e8 bf 2c 00 00 call 116648 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
113989: 31 c0 xor %eax,%eax
11398b: e9 3e ff ff ff jmp 1138ce <rtems_message_queue_create+0x2e>
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
if ( !the_message_queue ) {
_Thread_Enable_dispatch();
113990: e8 b3 2c 00 00 call 116648 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
113995: b8 05 00 00 00 mov $0x5,%eax
11399a: e9 2f ff ff ff jmp 1138ce <rtems_message_queue_create+0x2e>
0011658c <rtems_message_queue_delete>:
*/
rtems_status_code rtems_message_queue_delete(
rtems_id id
)
{
11658c: 55 push %ebp
11658d: 89 e5 mov %esp,%ebp
11658f: 53 push %ebx
116590: 83 ec 18 sub $0x18,%esp
register Message_queue_Control *the_message_queue;
Objects_Locations location;
the_message_queue = _Message_queue_Get( id, &location );
116593: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
116596: 50 push %eax
116597: ff 75 08 pushl 0x8(%ebp)
11659a: 68 e0 34 14 00 push $0x1434e0
11659f: e8 94 4d 00 00 call 11b338 <_Objects_Get>
1165a4: 89 c3 mov %eax,%ebx
switch ( location ) {
1165a6: 83 c4 10 add $0x10,%esp
1165a9: 8b 4d f4 mov -0xc(%ebp),%ecx
1165ac: 85 c9 test %ecx,%ecx
1165ae: 75 3c jne 1165ec <rtems_message_queue_delete+0x60>
case OBJECTS_LOCAL:
_Objects_Close( &_Message_queue_Information,
1165b0: 83 ec 08 sub $0x8,%esp
1165b3: 50 push %eax
1165b4: 68 e0 34 14 00 push $0x1434e0
1165b9: e8 06 49 00 00 call 11aec4 <_Objects_Close>
&the_message_queue->Object );
_CORE_message_queue_Close(
1165be: 83 c4 0c add $0xc,%esp
1165c1: 6a 05 push $0x5
1165c3: 6a 00 push $0x0
1165c5: 8d 43 14 lea 0x14(%ebx),%eax
1165c8: 50 push %eax
1165c9: e8 da 33 00 00 call 1199a8 <_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 );
1165ce: 58 pop %eax
1165cf: 5a pop %edx
1165d0: 53 push %ebx
1165d1: 68 e0 34 14 00 push $0x1434e0
1165d6: e8 e1 4b 00 00 call 11b1bc <_Objects_Free>
0, /* Not used */
0
);
}
#endif
_Thread_Enable_dispatch();
1165db: e8 e0 58 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1165e0: 83 c4 10 add $0x10,%esp
1165e3: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1165e5: 8b 5d fc mov -0x4(%ebp),%ebx
1165e8: c9 leave
1165e9: c3 ret
1165ea: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1165ec: b8 04 00 00 00 mov $0x4,%eax
}
1165f1: 8b 5d fc mov -0x4(%ebp),%ebx
1165f4: c9 leave
1165f5: c3 ret
001165f8 <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
rtems_id id,
uint32_t *count
)
{
1165f8: 55 push %ebp
1165f9: 89 e5 mov %esp,%ebp
1165fb: 53 push %ebx
1165fc: 83 ec 14 sub $0x14,%esp
1165ff: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116602: 85 db test %ebx,%ebx
116604: 74 46 je 11664c <rtems_message_queue_flush+0x54>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
116606: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
116607: 8d 45 f4 lea -0xc(%ebp),%eax
11660a: 50 push %eax
11660b: ff 75 08 pushl 0x8(%ebp)
11660e: 68 e0 34 14 00 push $0x1434e0
116613: e8 20 4d 00 00 call 11b338 <_Objects_Get>
switch ( location ) {
116618: 83 c4 10 add $0x10,%esp
11661b: 8b 55 f4 mov -0xc(%ebp),%edx
11661e: 85 d2 test %edx,%edx
116620: 74 0a je 11662c <rtems_message_queue_flush+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116622: b8 04 00 00 00 mov $0x4,%eax
}
116627: 8b 5d fc mov -0x4(%ebp),%ebx
11662a: c9 leave
11662b: 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 );
11662c: 83 ec 0c sub $0xc,%esp
11662f: 83 c0 14 add $0x14,%eax
116632: 50 push %eax
116633: e8 ac 33 00 00 call 1199e4 <_CORE_message_queue_Flush>
116638: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
11663a: e8 81 58 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11663f: 83 c4 10 add $0x10,%esp
116642: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116644: 8b 5d fc mov -0x4(%ebp),%ebx
116647: c9 leave
116648: c3 ret
116649: 8d 76 00 lea 0x0(%esi),%esi
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
return RTEMS_INVALID_ADDRESS;
11664c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116651: 8b 5d fc mov -0x4(%ebp),%ebx
116654: c9 leave
116655: c3 ret
00116658 <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
116658: 55 push %ebp
116659: 89 e5 mov %esp,%ebp
11665b: 53 push %ebx
11665c: 83 ec 14 sub $0x14,%esp
11665f: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
116662: 85 db test %ebx,%ebx
116664: 74 3a je 1166a0 <rtems_message_queue_get_number_pending+0x48>
116666: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
116667: 8d 45 f4 lea -0xc(%ebp),%eax
11666a: 50 push %eax
11666b: ff 75 08 pushl 0x8(%ebp)
11666e: 68 e0 34 14 00 push $0x1434e0
116673: e8 c0 4c 00 00 call 11b338 <_Objects_Get>
switch ( location ) {
116678: 83 c4 10 add $0x10,%esp
11667b: 8b 55 f4 mov -0xc(%ebp),%edx
11667e: 85 d2 test %edx,%edx
116680: 74 0a je 11668c <rtems_message_queue_get_number_pending+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116682: b8 04 00 00 00 mov $0x4,%eax
}
116687: 8b 5d fc mov -0x4(%ebp),%ebx
11668a: c9 leave
11668b: 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;
11668c: 8b 40 5c mov 0x5c(%eax),%eax
11668f: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
116691: e8 2a 58 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116696: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116698: 8b 5d fc mov -0x4(%ebp),%ebx
11669b: c9 leave
11669c: c3 ret
11669d: 8d 76 00 lea 0x0(%esi),%esi
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
return RTEMS_INVALID_ADDRESS;
1166a0: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1166a5: 8b 5d fc mov -0x4(%ebp),%ebx
1166a8: c9 leave
1166a9: c3 ret
001139c4 <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
1139c4: 55 push %ebp
1139c5: 89 e5 mov %esp,%ebp
1139c7: 56 push %esi
1139c8: 53 push %ebx
1139c9: 83 ec 10 sub $0x10,%esp
1139cc: 8b 5d 0c mov 0xc(%ebp),%ebx
1139cf: 8b 75 10 mov 0x10(%ebp),%esi
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
1139d2: 85 db test %ebx,%ebx
1139d4: 74 6e je 113a44 <rtems_message_queue_receive+0x80>
return RTEMS_INVALID_ADDRESS;
if ( !size )
1139d6: 85 f6 test %esi,%esi
1139d8: 74 6a je 113a44 <rtems_message_queue_receive+0x80>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
1139da: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
1139db: 8d 45 f4 lea -0xc(%ebp),%eax
1139de: 50 push %eax
1139df: ff 75 08 pushl 0x8(%ebp)
1139e2: 68 20 11 13 00 push $0x131120
1139e7: e8 54 20 00 00 call 115a40 <_Objects_Get>
switch ( location ) {
1139ec: 83 c4 10 add $0x10,%esp
1139ef: 8b 55 f4 mov -0xc(%ebp),%edx
1139f2: 85 d2 test %edx,%edx
1139f4: 75 42 jne 113a38 <rtems_message_queue_receive+0x74>
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
1139f6: 83 ec 08 sub $0x8,%esp
1139f9: 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;
1139fc: 8b 55 14 mov 0x14(%ebp),%edx
1139ff: 83 e2 01 and $0x1,%edx
113a02: 83 f2 01 xor $0x1,%edx
113a05: 52 push %edx
113a06: 56 push %esi
113a07: 53 push %ebx
113a08: ff 70 08 pushl 0x8(%eax)
113a0b: 83 c0 14 add $0x14,%eax
113a0e: 50 push %eax
113a0f: e8 00 11 00 00 call 114b14 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
113a14: 83 c4 20 add $0x20,%esp
113a17: e8 2c 2c 00 00 call 116648 <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
113a1c: 83 ec 0c sub $0xc,%esp
_Thread_Executing->Wait.return_code
113a1f: a1 d8 0c 13 00 mov 0x130cd8,%eax
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
113a24: ff 70 34 pushl 0x34(%eax)
113a27: e8 a0 00 00 00 call 113acc <_Message_queue_Translate_core_message_queue_return_code>
113a2c: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113a2f: 8d 65 f8 lea -0x8(%ebp),%esp
113a32: 5b pop %ebx
113a33: 5e pop %esi
113a34: c9 leave
113a35: c3 ret
113a36: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
113a38: b8 04 00 00 00 mov $0x4,%eax
}
113a3d: 8d 65 f8 lea -0x8(%ebp),%esp
113a40: 5b pop %ebx
113a41: 5e pop %esi
113a42: c9 leave
113a43: c3 ret
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
113a44: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
113a49: 8d 65 f8 lea -0x8(%ebp),%esp
113a4c: 5b pop %ebx
113a4d: 5e pop %esi
113a4e: c9 leave
113a4f: c3 ret
0010b3f0 <rtems_message_queue_send>:
rtems_status_code rtems_message_queue_send(
rtems_id id,
const void *buffer,
size_t size
)
{
10b3f0: 55 push %ebp
10b3f1: 89 e5 mov %esp,%ebp
10b3f3: 56 push %esi
10b3f4: 53 push %ebx
10b3f5: 83 ec 10 sub $0x10,%esp
10b3f8: 8b 75 08 mov 0x8(%ebp),%esi
10b3fb: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
10b3fe: 85 db test %ebx,%ebx
10b400: 74 5e je 10b460 <rtems_message_queue_send+0x70>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
10b402: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
10b403: 8d 45 f4 lea -0xc(%ebp),%eax
10b406: 50 push %eax
10b407: 56 push %esi
10b408: 68 40 88 12 00 push $0x128840
10b40d: e8 6e 1a 00 00 call 10ce80 <_Objects_Get>
switch ( location ) {
10b412: 83 c4 10 add $0x10,%esp
10b415: 8b 55 f4 mov -0xc(%ebp),%edx
10b418: 85 d2 test %edx,%edx
10b41a: 74 0c je 10b428 <rtems_message_queue_send+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b41c: b8 04 00 00 00 mov $0x4,%eax
}
10b421: 8d 65 f8 lea -0x8(%ebp),%esp
10b424: 5b pop %ebx
10b425: 5e pop %esi
10b426: c9 leave
10b427: c3 ret
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
10b428: 6a 00 push $0x0
10b42a: 6a 00 push $0x0
10b42c: 68 ff ff ff 7f push $0x7fffffff
10b431: 6a 00 push $0x0
10b433: 56 push %esi
10b434: ff 75 10 pushl 0x10(%ebp)
10b437: 53 push %ebx
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_message_queue_Send(
10b438: 83 c0 14 add $0x14,%eax
10b43b: 50 push %eax
10b43c: e8 3f 0c 00 00 call 10c080 <_CORE_message_queue_Submit>
10b441: 89 c3 mov %eax,%ebx
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
10b443: 83 c4 20 add $0x20,%esp
10b446: e8 bd 25 00 00 call 10da08 <_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);
10b44b: 83 ec 0c sub $0xc,%esp
10b44e: 53 push %ebx
10b44f: e8 18 00 00 00 call 10b46c <_Message_queue_Translate_core_message_queue_return_code>
10b454: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b457: 8d 65 f8 lea -0x8(%ebp),%esp
10b45a: 5b pop %ebx
10b45b: 5e pop %esi
10b45c: c9 leave
10b45d: c3 ret
10b45e: 66 90 xchg %ax,%ax
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
10b460: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b465: 8d 65 f8 lea -0x8(%ebp),%esp
10b468: 5b pop %ebx
10b469: 5e pop %esi
10b46a: c9 leave
10b46b: c3 ret
001167e8 <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
rtems_id id,
const void *buffer,
size_t size
)
{
1167e8: 55 push %ebp
1167e9: 89 e5 mov %esp,%ebp
1167eb: 56 push %esi
1167ec: 53 push %ebx
1167ed: 83 ec 10 sub $0x10,%esp
1167f0: 8b 75 08 mov 0x8(%ebp),%esi
1167f3: 8b 5d 0c mov 0xc(%ebp),%ebx
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
1167f6: 85 db test %ebx,%ebx
1167f8: 74 5e je 116858 <rtems_message_queue_urgent+0x70>
1167fa: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
1167fb: 8d 45 f4 lea -0xc(%ebp),%eax
1167fe: 50 push %eax
1167ff: 56 push %esi
116800: 68 e0 34 14 00 push $0x1434e0
116805: e8 2e 4b 00 00 call 11b338 <_Objects_Get>
switch ( location ) {
11680a: 83 c4 10 add $0x10,%esp
11680d: 8b 55 f4 mov -0xc(%ebp),%edx
116810: 85 d2 test %edx,%edx
116812: 74 0c je 116820 <rtems_message_queue_urgent+0x38>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116814: b8 04 00 00 00 mov $0x4,%eax
}
116819: 8d 65 f8 lea -0x8(%ebp),%esp
11681c: 5b pop %ebx
11681d: 5e pop %esi
11681e: c9 leave
11681f: c3 ret
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
116820: 6a 00 push $0x0
116822: 6a 00 push $0x0
116824: 68 00 00 00 80 push $0x80000000
116829: 6a 00 push $0x0
11682b: 56 push %esi
11682c: ff 75 10 pushl 0x10(%ebp)
11682f: 53 push %ebx
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status = _CORE_message_queue_Urgent(
116830: 83 c0 14 add $0x14,%eax
116833: 50 push %eax
116834: e8 eb 33 00 00 call 119c24 <_CORE_message_queue_Submit>
116839: 89 c3 mov %eax,%ebx
id,
MESSAGE_QUEUE_MP_HANDLER,
false, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
11683b: 83 c4 20 add $0x20,%esp
11683e: e8 7d 56 00 00 call 11bec0 <_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);
116843: 83 ec 0c sub $0xc,%esp
116846: 53 push %ebx
116847: e8 8c ff ff ff call 1167d8 <_Message_queue_Translate_core_message_queue_return_code>
11684c: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11684f: 8d 65 f8 lea -0x8(%ebp),%esp
116852: 5b pop %ebx
116853: 5e pop %esi
116854: c9 leave
116855: c3 ret
116856: 66 90 xchg %ax,%ax
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
116858: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11685d: 8d 65 f8 lea -0x8(%ebp),%esp
116860: 5b pop %ebx
116861: 5e pop %esi
116862: c9 leave
116863: c3 ret
0011252c <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
11252c: 55 push %ebp
11252d: 89 e5 mov %esp,%ebp
11252f: 57 push %edi
112530: 56 push %esi
112531: 53 push %ebx
112532: 83 ec 78 sub $0x78,%esp
int success = 0;
char *dup_path = strdup(path);
112535: ff 75 08 pushl 0x8(%ebp)
112538: e8 d7 35 00 00 call 115b14 <strdup>
11253d: 89 c7 mov %eax,%edi
if (dup_path != NULL) {
11253f: 83 c4 10 add $0x10,%esp
112542: 85 c0 test %eax,%eax
112544: 0f 84 0a 01 00 00 je 112654 <rtems_mkdir+0x128> <== NEVER TAKEN
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
11254a: 8a 10 mov (%eax),%dl
11254c: 80 fa 2f cmp $0x2f,%dl
11254f: 0f 84 0f 01 00 00 je 112664 <rtems_mkdir+0x138>
112555: 89 c3 mov %eax,%ebx
112557: c7 45 94 00 00 00 00 movl $0x0,-0x6c(%ebp)
11255e: b8 01 00 00 00 mov $0x1,%eax
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
112563: 84 d2 test %dl,%dl
112565: 74 11 je 112578 <rtems_mkdir+0x4c> <== NEVER TAKEN
112567: 90 nop
last = 1;
else if (p[0] != '/')
112568: 80 fa 2f cmp $0x2f,%dl
11256b: 0f 84 83 00 00 00 je 1125f4 <rtems_mkdir+0xc8>
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
112571: 43 inc %ebx
112572: 8a 13 mov (%ebx),%dl
if (p[0] == '\0')
112574: 84 d2 test %dl,%dl
112576: 75 f0 jne 112568 <rtems_mkdir+0x3c>
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
112578: c6 03 00 movb $0x0,(%ebx)
11257b: be 01 00 00 00 mov $0x1,%esi
if (!last && p[1] == '\0')
last = 1;
if (first) {
112580: 85 c0 test %eax,%eax
112582: 75 54 jne 1125d8 <rtems_mkdir+0xac>
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
112584: 85 f6 test %esi,%esi
112586: 75 3c jne 1125c4 <rtems_mkdir+0x98>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
112588: b8 ff 01 00 00 mov $0x1ff,%eax
11258d: 83 ec 08 sub $0x8,%esp
112590: 50 push %eax
112591: 57 push %edi
112592: e8 8d 71 ff ff call 109724 <mkdir>
112597: 83 c4 10 add $0x10,%esp
11259a: 85 c0 test %eax,%eax
11259c: 78 6a js 112608 <rtems_mkdir+0xdc>
} else {
retval = 0;
break;
}
}
if (!last)
11259e: 85 f6 test %esi,%esi
1125a0: 75 0a jne 1125ac <rtems_mkdir+0x80>
*p = '/';
1125a2: c6 03 2f movb $0x2f,(%ebx)
1125a5: 31 c0 xor %eax,%eax
1125a7: eb c8 jmp 112571 <rtems_mkdir+0x45>
1125a9: 8d 76 00 lea 0x0(%esi),%esi
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
1125ac: 83 ec 0c sub $0xc,%esp
1125af: 57 push %edi
1125b0: e8 77 6b ff ff call 10912c <free>
1125b5: 83 c4 10 add $0x10,%esp
}
return success != 0 ? 0 : -1;
1125b8: 31 c0 xor %eax,%eax
}
1125ba: 8d 65 f4 lea -0xc(%ebp),%esp
1125bd: 5b pop %ebx
1125be: 5e pop %esi
1125bf: 5f pop %edi
1125c0: c9 leave
1125c1: c3 ret
1125c2: 66 90 xchg %ax,%ax
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
1125c4: 83 ec 0c sub $0xc,%esp
1125c7: ff 75 94 pushl -0x6c(%ebp)
1125ca: e8 81 01 00 00 call 112750 <umask>
1125cf: 83 c4 10 add $0x10,%esp
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
1125d2: 8b 45 0c mov 0xc(%ebp),%eax
1125d5: eb b6 jmp 11258d <rtems_mkdir+0x61>
1125d7: 90 nop
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
1125d8: 83 ec 0c sub $0xc,%esp
1125db: 6a 00 push $0x0
1125dd: e8 6e 01 00 00 call 112750 <umask>
1125e2: 89 45 94 mov %eax,-0x6c(%ebp)
numask = oumask & ~(S_IWUSR | S_IXUSR);
1125e5: 24 3f and $0x3f,%al
(void)umask(numask);
1125e7: 89 04 24 mov %eax,(%esp)
1125ea: e8 61 01 00 00 call 112750 <umask>
1125ef: 83 c4 10 add $0x10,%esp
1125f2: eb 90 jmp 112584 <rtems_mkdir+0x58>
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
1125f4: c6 03 00 movb $0x0,(%ebx)
if (!last && p[1] == '\0')
1125f7: 31 d2 xor %edx,%edx
1125f9: 80 7b 01 00 cmpb $0x0,0x1(%ebx)
1125fd: 0f 94 c2 sete %dl
112600: 89 d6 mov %edx,%esi
112602: e9 79 ff ff ff jmp 112580 <rtems_mkdir+0x54>
112607: 90 nop
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
112608: e8 7b 28 00 00 call 114e88 <__errno>
11260d: 83 38 11 cmpl $0x11,(%eax)
112610: 74 0a je 11261c <rtems_mkdir+0xf0>
112612: e8 71 28 00 00 call 114e88 <__errno>
112617: 83 38 15 cmpl $0x15,(%eax)
11261a: 75 53 jne 11266f <rtems_mkdir+0x143> <== ALWAYS TAKEN
if (stat(path, &sb) < 0) {
11261c: 83 ec 08 sub $0x8,%esp
11261f: 8d 45 a0 lea -0x60(%ebp),%eax
112622: 50 push %eax
112623: 57 push %edi
112624: e8 7f 00 00 00 call 1126a8 <stat>
112629: 83 c4 10 add $0x10,%esp
11262c: 85 c0 test %eax,%eax
11262e: 78 3f js 11266f <rtems_mkdir+0x143> <== NEVER TAKEN
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
112630: 8b 45 ac mov -0x54(%ebp),%eax
112633: 25 00 f0 00 00 and $0xf000,%eax
112638: 3d 00 40 00 00 cmp $0x4000,%eax
11263d: 0f 84 5b ff ff ff je 11259e <rtems_mkdir+0x72>
if (last)
112643: 85 f6 test %esi,%esi
112645: 74 53 je 11269a <rtems_mkdir+0x16e>
errno = EEXIST;
112647: e8 3c 28 00 00 call 114e88 <__errno>
11264c: c7 00 11 00 00 00 movl $0x11,(%eax)
112652: eb 2d jmp 112681 <rtems_mkdir+0x155>
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
112654: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
}
112659: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
11265c: 5b pop %ebx <== NOT EXECUTED
11265d: 5e pop %esi <== NOT EXECUTED
11265e: 5f pop %edi <== NOT EXECUTED
11265f: c9 leave <== NOT EXECUTED
112660: c3 ret <== NOT EXECUTED
112661: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
112664: 8d 58 01 lea 0x1(%eax),%ebx
112667: 8a 50 01 mov 0x1(%eax),%dl
11266a: e9 e8 fe ff ff jmp 112557 <rtems_mkdir+0x2b>
}
}
if (!last)
*p = '/';
}
if (!first && !last)
11266f: 85 f6 test %esi,%esi
112671: 75 0e jne 112681 <rtems_mkdir+0x155> <== ALWAYS TAKEN
(void)umask(oumask);
112673: 83 ec 0c sub $0xc,%esp
112676: ff 75 94 pushl -0x6c(%ebp)
112679: e8 d2 00 00 00 call 112750 <umask>
11267e: 83 c4 10 add $0x10,%esp
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
112681: 83 ec 0c sub $0xc,%esp
112684: 57 push %edi
112685: e8 a2 6a ff ff call 10912c <free>
11268a: 83 c4 10 add $0x10,%esp
}
return success != 0 ? 0 : -1;
11268d: b8 ff ff ff ff mov $0xffffffff,%eax
}
112692: 8d 65 f4 lea -0xc(%ebp),%esp
112695: 5b pop %ebx
112696: 5e pop %esi
112697: 5f pop %edi
112698: c9 leave
112699: c3 ret
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
11269a: e8 e9 27 00 00 call 114e88 <__errno>
11269f: c7 00 14 00 00 00 movl $0x14,(%eax)
1126a5: eb cc jmp 112673 <rtems_mkdir+0x147>
0010b9c0 <rtems_object_get_api_name>:
};
const char *rtems_object_get_api_name(
int api
)
{
10b9c0: 55 push %ebp
10b9c1: 89 e5 mov %esp,%ebp
10b9c3: 83 ec 10 sub $0x10,%esp
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
10b9c6: ff 75 08 pushl 0x8(%ebp)
10b9c9: 68 e0 7c 12 00 push $0x127ce0
10b9ce: e8 e1 49 00 00 call 1103b4 <rtems_assoc_ptr_by_local>
if ( api_assoc )
10b9d3: 83 c4 10 add $0x10,%esp
10b9d6: 85 c0 test %eax,%eax
10b9d8: 74 06 je 10b9e0 <rtems_object_get_api_name+0x20>
return api_assoc->name;
10b9da: 8b 00 mov (%eax),%eax
return "BAD CLASS";
}
10b9dc: c9 leave
10b9dd: c3 ret
10b9de: 66 90 xchg %ax,%ax
const rtems_assoc_t *api_assoc;
api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
if ( api_assoc )
return api_assoc->name;
return "BAD CLASS";
10b9e0: b8 03 2d 12 00 mov $0x122d03,%eax
}
10b9e5: c9 leave
10b9e6: c3 ret
0010d0e8 <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
)
{
10d0e8: 55 push %ebp
10d0e9: 89 e5 mov %esp,%ebp
10d0eb: 57 push %edi
10d0ec: 56 push %esi
10d0ed: 53 push %ebx
10d0ee: 83 ec 0c sub $0xc,%esp
10d0f1: 8b 5d 10 mov 0x10(%ebp),%ebx
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
10d0f4: 85 db test %ebx,%ebx
10d0f6: 74 60 je 10d158 <rtems_object_get_class_information+0x70>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
10d0f8: 83 ec 08 sub $0x8,%esp
10d0fb: 0f b7 45 0c movzwl 0xc(%ebp),%eax
10d0ff: 50 push %eax
10d100: ff 75 08 pushl 0x8(%ebp)
10d103: e8 4c 1b 00 00 call 10ec54 <_Objects_Get_information>
if ( !obj_info )
10d108: 83 c4 10 add $0x10,%esp
10d10b: 85 c0 test %eax,%eax
10d10d: 74 59 je 10d168 <rtems_object_get_class_information+0x80>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
10d10f: 8b 50 08 mov 0x8(%eax),%edx
10d112: 89 13 mov %edx,(%ebx)
info->maximum_id = obj_info->maximum_id;
10d114: 8b 50 0c mov 0xc(%eax),%edx
10d117: 89 53 04 mov %edx,0x4(%ebx)
info->auto_extend = obj_info->auto_extend;
10d11a: 8a 50 12 mov 0x12(%eax),%dl
10d11d: 88 53 0c mov %dl,0xc(%ebx)
info->maximum = obj_info->maximum;
10d120: 0f b7 70 10 movzwl 0x10(%eax),%esi
10d124: 89 73 08 mov %esi,0x8(%ebx)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
10d127: 85 f6 test %esi,%esi
10d129: 74 44 je 10d16f <rtems_object_get_class_information+0x87><== NEVER TAKEN
10d12b: 8b 78 1c mov 0x1c(%eax),%edi
10d12e: b9 01 00 00 00 mov $0x1,%ecx
10d133: b8 01 00 00 00 mov $0x1,%eax
10d138: 31 d2 xor %edx,%edx
10d13a: 66 90 xchg %ax,%ax
if ( !obj_info->local_table[i] )
unallocated++;
10d13c: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4)
10d140: 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++ )
10d143: 40 inc %eax
10d144: 89 c1 mov %eax,%ecx
10d146: 39 c6 cmp %eax,%esi
10d148: 73 f2 jae 10d13c <rtems_object_get_class_information+0x54>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
10d14a: 89 53 10 mov %edx,0x10(%ebx)
return RTEMS_SUCCESSFUL;
10d14d: 31 c0 xor %eax,%eax
}
10d14f: 8d 65 f4 lea -0xc(%ebp),%esp
10d152: 5b pop %ebx
10d153: 5e pop %esi
10d154: 5f pop %edi
10d155: c9 leave
10d156: c3 ret
10d157: 90 nop
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
10d158: b8 09 00 00 00 mov $0x9,%eax
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
10d15d: 8d 65 f4 lea -0xc(%ebp),%esp
10d160: 5b pop %ebx
10d161: 5e pop %esi
10d162: 5f pop %edi
10d163: c9 leave
10d164: c3 ret
10d165: 8d 76 00 lea 0x0(%esi),%esi
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
10d168: b8 0a 00 00 00 mov $0xa,%eax
10d16d: eb e0 jmp 10d14f <rtems_object_get_class_information+0x67>
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++ )
10d16f: 31 d2 xor %edx,%edx <== NOT EXECUTED
10d171: eb d7 jmp 10d14a <rtems_object_get_class_information+0x62><== NOT EXECUTED
0010c568 <rtems_object_get_classic_name>:
rtems_status_code rtems_object_get_classic_name(
rtems_id id,
rtems_name *name
)
{
10c568: 55 push %ebp
10c569: 89 e5 mov %esp,%ebp
10c56b: 53 push %ebx
10c56c: 83 ec 14 sub $0x14,%esp
10c56f: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
10c572: 85 db test %ebx,%ebx
10c574: 74 26 je 10c59c <rtems_object_get_classic_name+0x34>
return RTEMS_INVALID_ADDRESS;
status = _Objects_Id_to_name( id, &name_u );
10c576: 83 ec 08 sub $0x8,%esp
10c579: 8d 45 f4 lea -0xc(%ebp),%eax
10c57c: 50 push %eax
10c57d: ff 75 08 pushl 0x8(%ebp)
10c580: e8 a7 1b 00 00 call 10e12c <_Objects_Id_to_name>
*name = name_u.name_u32;
10c585: 8b 55 f4 mov -0xc(%ebp),%edx
10c588: 89 13 mov %edx,(%ebx)
return _Status_Object_name_errors_to_status[ status ];
10c58a: 8b 04 85 ec 38 12 00 mov 0x1238ec(,%eax,4),%eax
10c591: 83 c4 10 add $0x10,%esp
}
10c594: 8b 5d fc mov -0x4(%ebp),%ebx
10c597: c9 leave
10c598: c3 ret
10c599: 8d 76 00 lea 0x0(%esi),%esi
{
Objects_Name_or_id_lookup_errors status;
Objects_Name name_u;
if ( !name )
return RTEMS_INVALID_ADDRESS;
10c59c: 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 ];
}
10c5a1: 8b 5d fc mov -0x4(%ebp),%ebx
10c5a4: c9 leave
10c5a5: c3 ret
0010b9f4 <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
10b9f4: 55 push %ebp
10b9f5: 89 e5 mov %esp,%ebp
10b9f7: 57 push %edi
10b9f8: 56 push %esi
10b9f9: 53 push %ebx
10b9fa: 83 ec 1c sub $0x1c,%esp
10b9fd: 8b 75 08 mov 0x8(%ebp),%esi
10ba00: 8b 7d 0c mov 0xc(%ebp),%edi
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
10ba03: 85 ff test %edi,%edi
10ba05: 74 61 je 10ba68 <rtems_object_set_name+0x74>
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10ba07: 85 f6 test %esi,%esi
10ba09: 74 35 je 10ba40 <rtems_object_set_name+0x4c>
information = _Objects_Get_information_id( tmpId );
10ba0b: 83 ec 0c sub $0xc,%esp
10ba0e: 56 push %esi
10ba0f: e8 24 19 00 00 call 10d338 <_Objects_Get_information_id>
10ba14: 89 c3 mov %eax,%ebx
if ( !information )
10ba16: 83 c4 10 add $0x10,%esp
10ba19: 85 c0 test %eax,%eax
10ba1b: 74 16 je 10ba33 <rtems_object_set_name+0x3f>
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
10ba1d: 50 push %eax
10ba1e: 8d 45 e4 lea -0x1c(%ebp),%eax
10ba21: 50 push %eax
10ba22: 56 push %esi
10ba23: 53 push %ebx
10ba24: e8 c7 1a 00 00 call 10d4f0 <_Objects_Get>
switch ( location ) {
10ba29: 83 c4 10 add $0x10,%esp
10ba2c: 8b 4d e4 mov -0x1c(%ebp),%ecx
10ba2f: 85 c9 test %ecx,%ecx
10ba31: 74 19 je 10ba4c <rtems_object_set_name+0x58>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10ba33: b8 04 00 00 00 mov $0x4,%eax
}
10ba38: 8d 65 f4 lea -0xc(%ebp),%esp
10ba3b: 5b pop %ebx
10ba3c: 5e pop %esi
10ba3d: 5f pop %edi
10ba3e: c9 leave
10ba3f: c3 ret
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
10ba40: a1 98 a6 12 00 mov 0x12a698,%eax
10ba45: 8b 70 08 mov 0x8(%eax),%esi
10ba48: eb c1 jmp 10ba0b <rtems_object_set_name+0x17>
10ba4a: 66 90 xchg %ax,%ax
the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
10ba4c: 52 push %edx
10ba4d: 57 push %edi
10ba4e: 50 push %eax
10ba4f: 53 push %ebx
10ba50: e8 93 1c 00 00 call 10d6e8 <_Objects_Set_name>
_Thread_Enable_dispatch();
10ba55: e8 fa 26 00 00 call 10e154 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ba5a: 83 c4 10 add $0x10,%esp
10ba5d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ba5f: 8d 65 f4 lea -0xc(%ebp),%esp
10ba62: 5b pop %ebx
10ba63: 5e pop %esi
10ba64: 5f pop %edi
10ba65: c9 leave
10ba66: c3 ret
10ba67: 90 nop
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
10ba68: b8 09 00 00 00 mov $0x9,%eax
10ba6d: eb c9 jmp 10ba38 <rtems_object_set_name+0x44>
00116864 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
116864: 55 push %ebp
116865: 89 e5 mov %esp,%ebp
116867: 57 push %edi
116868: 56 push %esi
116869: 53 push %ebx
11686a: 83 ec 1c sub $0x1c,%esp
11686d: 8b 5d 08 mov 0x8(%ebp),%ebx
116870: 8b 75 0c mov 0xc(%ebp),%esi
116873: 8b 55 10 mov 0x10(%ebp),%edx
116876: 8b 7d 14 mov 0x14(%ebp),%edi
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
116879: 85 db test %ebx,%ebx
11687b: 74 47 je 1168c4 <rtems_partition_create+0x60>
return RTEMS_INVALID_NAME;
if ( !starting_address )
11687d: 85 f6 test %esi,%esi
11687f: 74 23 je 1168a4 <rtems_partition_create+0x40>
return RTEMS_INVALID_ADDRESS;
if ( !id )
116881: 8b 45 1c mov 0x1c(%ebp),%eax
116884: 85 c0 test %eax,%eax
116886: 74 1c je 1168a4 <rtems_partition_create+0x40><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
116888: 85 d2 test %edx,%edx
11688a: 74 28 je 1168b4 <rtems_partition_create+0x50>
11688c: 85 ff test %edi,%edi
11688e: 74 24 je 1168b4 <rtems_partition_create+0x50>
116890: 39 fa cmp %edi,%edx
116892: 72 20 jb 1168b4 <rtems_partition_create+0x50>
116894: f7 c7 03 00 00 00 test $0x3,%edi
11689a: 75 18 jne 1168b4 <rtems_partition_create+0x50>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
11689c: f7 c6 03 00 00 00 test $0x3,%esi
1168a2: 74 30 je 1168d4 <rtems_partition_create+0x70>
return RTEMS_INVALID_ADDRESS;
1168a4: b8 09 00 00 00 mov $0x9,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1168a9: 8d 65 f4 lea -0xc(%ebp),%esp
1168ac: 5b pop %ebx
1168ad: 5e pop %esi
1168ae: 5f pop %edi
1168af: c9 leave
1168b0: c3 ret
1168b1: 8d 76 00 lea 0x0(%esi),%esi
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;
1168b4: b8 08 00 00 00 mov $0x8,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1168b9: 8d 65 f4 lea -0xc(%ebp),%esp
1168bc: 5b pop %ebx
1168bd: 5e pop %esi
1168be: 5f pop %edi
1168bf: c9 leave
1168c0: c3 ret
1168c1: 8d 76 00 lea 0x0(%esi),%esi
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
1168c4: b8 03 00 00 00 mov $0x3,%eax
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
1168c9: 8d 65 f4 lea -0xc(%ebp),%esp
1168cc: 5b pop %ebx
1168cd: 5e pop %esi
1168ce: 5f pop %edi
1168cf: c9 leave
1168d0: c3 ret
1168d1: 8d 76 00 lea 0x0(%esi),%esi
1168d4: a1 f0 2a 14 00 mov 0x142af0,%eax
1168d9: 40 inc %eax
1168da: a3 f0 2a 14 00 mov %eax,0x142af0
* 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 );
1168df: 83 ec 0c sub $0xc,%esp
1168e2: 68 80 29 14 00 push $0x142980
1168e7: 89 55 e0 mov %edx,-0x20(%ebp)
1168ea: e8 59 45 00 00 call 11ae48 <_Objects_Allocate>
1168ef: 89 45 e4 mov %eax,-0x1c(%ebp)
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
1168f2: 83 c4 10 add $0x10,%esp
1168f5: 85 c0 test %eax,%eax
1168f7: 8b 55 e0 mov -0x20(%ebp),%edx
1168fa: 74 58 je 116954 <rtems_partition_create+0xf0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
1168fc: 8b 45 e4 mov -0x1c(%ebp),%eax
1168ff: 89 70 10 mov %esi,0x10(%eax)
the_partition->length = length;
116902: 89 50 14 mov %edx,0x14(%eax)
the_partition->buffer_size = buffer_size;
116905: 89 78 18 mov %edi,0x18(%eax)
the_partition->attribute_set = attribute_set;
116908: 8b 4d 18 mov 0x18(%ebp),%ecx
11690b: 89 48 1c mov %ecx,0x1c(%eax)
the_partition->number_of_used_blocks = 0;
11690e: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax)
_Chain_Initialize( &the_partition->Memory, starting_address,
116915: 57 push %edi
116916: 89 d0 mov %edx,%eax
116918: 31 d2 xor %edx,%edx
11691a: f7 f7 div %edi
11691c: 50 push %eax
11691d: 56 push %esi
11691e: 8b 45 e4 mov -0x1c(%ebp),%eax
116921: 83 c0 24 add $0x24,%eax
116924: 50 push %eax
116925: e8 9e 2f 00 00 call 1198c8 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
11692a: 8b 7d e4 mov -0x1c(%ebp),%edi
11692d: 8b 47 08 mov 0x8(%edi),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
116930: 0f b7 f0 movzwl %ax,%esi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
116933: 8b 15 9c 29 14 00 mov 0x14299c,%edx
116939: 89 3c b2 mov %edi,(%edx,%esi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
11693c: 89 5f 0c mov %ebx,0xc(%edi)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
11693f: 8b 55 1c mov 0x1c(%ebp),%edx
116942: 89 02 mov %eax,(%edx)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
116944: e8 77 55 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116949: 83 c4 10 add $0x10,%esp
11694c: 31 c0 xor %eax,%eax
11694e: e9 66 ff ff ff jmp 1168b9 <rtems_partition_create+0x55>
116953: 90 nop
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
116954: e8 67 55 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
116959: b8 05 00 00 00 mov $0x5,%eax
11695e: e9 56 ff ff ff jmp 1168b9 <rtems_partition_create+0x55>
001169d0 <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
rtems_id id,
void **buffer
)
{
1169d0: 55 push %ebp
1169d1: 89 e5 mov %esp,%ebp
1169d3: 56 push %esi
1169d4: 53 push %ebx
1169d5: 83 ec 20 sub $0x20,%esp
1169d8: 8b 5d 0c mov 0xc(%ebp),%ebx
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
1169db: 85 db test %ebx,%ebx
1169dd: 74 59 je 116a38 <rtems_partition_get_buffer+0x68>
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
1169df: 52 push %edx
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
1169e0: 8d 45 f4 lea -0xc(%ebp),%eax
1169e3: 50 push %eax
1169e4: ff 75 08 pushl 0x8(%ebp)
1169e7: 68 80 29 14 00 push $0x142980
1169ec: e8 47 49 00 00 call 11b338 <_Objects_Get>
1169f1: 89 c6 mov %eax,%esi
switch ( location ) {
1169f3: 83 c4 10 add $0x10,%esp
1169f6: 8b 45 f4 mov -0xc(%ebp),%eax
1169f9: 85 c0 test %eax,%eax
1169fb: 75 2f jne 116a2c <rtems_partition_get_buffer+0x5c>
*/
RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
Partition_Control *the_partition
)
{
return _Chain_Get( &the_partition->Memory );
1169fd: 83 ec 0c sub $0xc,%esp
116a00: 8d 46 24 lea 0x24(%esi),%eax
116a03: 50 push %eax
116a04: e8 9b 2e 00 00 call 1198a4 <_Chain_Get>
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
116a09: 83 c4 10 add $0x10,%esp
116a0c: 85 c0 test %eax,%eax
116a0e: 74 34 je 116a44 <rtems_partition_get_buffer+0x74>
the_partition->number_of_used_blocks += 1;
116a10: ff 46 20 incl 0x20(%esi)
_Thread_Enable_dispatch();
116a13: 89 45 e4 mov %eax,-0x1c(%ebp)
116a16: e8 a5 54 00 00 call 11bec0 <_Thread_Enable_dispatch>
*buffer = the_buffer;
116a1b: 8b 45 e4 mov -0x1c(%ebp),%eax
116a1e: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
116a20: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116a22: 8d 65 f8 lea -0x8(%ebp),%esp
116a25: 5b pop %ebx
116a26: 5e pop %esi
116a27: c9 leave
116a28: c3 ret
116a29: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116a2c: b8 04 00 00 00 mov $0x4,%eax
}
116a31: 8d 65 f8 lea -0x8(%ebp),%esp
116a34: 5b pop %ebx
116a35: 5e pop %esi
116a36: c9 leave
116a37: c3 ret
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
116a38: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116a3d: 8d 65 f8 lea -0x8(%ebp),%esp
116a40: 5b pop %ebx
116a41: 5e pop %esi
116a42: c9 leave
116a43: c3 ret
the_partition->number_of_used_blocks += 1;
_Thread_Enable_dispatch();
*buffer = the_buffer;
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
116a44: e8 77 54 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_UNSATISFIED;
116a49: b8 0d 00 00 00 mov $0xd,%eax
116a4e: eb e1 jmp 116a31 <rtems_partition_get_buffer+0x61>
00116a74 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
116a74: 55 push %ebp
116a75: 89 e5 mov %esp,%ebp
116a77: 56 push %esi
116a78: 53 push %ebx
116a79: 83 ec 14 sub $0x14,%esp
116a7c: 8b 75 0c mov 0xc(%ebp),%esi
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
116a7f: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
116a82: 50 push %eax
116a83: ff 75 08 pushl 0x8(%ebp)
116a86: 68 80 29 14 00 push $0x142980
116a8b: e8 a8 48 00 00 call 11b338 <_Objects_Get>
116a90: 89 c3 mov %eax,%ebx
switch ( location ) {
116a92: 83 c4 10 add $0x10,%esp
116a95: 8b 45 f4 mov -0xc(%ebp),%eax
116a98: 85 c0 test %eax,%eax
116a9a: 74 0c je 116aa8 <rtems_partition_return_buffer+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116a9c: b8 04 00 00 00 mov $0x4,%eax
}
116aa1: 8d 65 f8 lea -0x8(%ebp),%esp
116aa4: 5b pop %ebx
116aa5: 5e pop %esi
116aa6: c9 leave
116aa7: c3 ret
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
116aa8: 8b 43 10 mov 0x10(%ebx),%eax
ending = _Addresses_Add_offset( starting, the_partition->length );
116aab: 8b 53 14 mov 0x14(%ebx),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
116aae: 39 c6 cmp %eax,%esi
116ab0: 72 3a jb 116aec <rtems_partition_return_buffer+0x78>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
116ab2: 8d 14 10 lea (%eax,%edx,1),%edx
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
116ab5: 39 d6 cmp %edx,%esi
116ab7: 77 33 ja 116aec <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);
116ab9: 89 f2 mov %esi,%edx
116abb: 29 c2 sub %eax,%edx
116abd: 89 d0 mov %edx,%eax
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
116abf: 31 d2 xor %edx,%edx
116ac1: 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 ) &&
116ac4: 85 d2 test %edx,%edx
116ac6: 75 24 jne 116aec <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 );
116ac8: 83 ec 08 sub $0x8,%esp
116acb: 56 push %esi
116acc: 8d 43 24 lea 0x24(%ebx),%eax
116acf: 50 push %eax
116ad0: e8 93 2d 00 00 call 119868 <_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;
116ad5: ff 4b 20 decl 0x20(%ebx)
_Thread_Enable_dispatch();
116ad8: e8 e3 53 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116add: 83 c4 10 add $0x10,%esp
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
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
116aec: e8 cf 53 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
116af1: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116af6: 8d 65 f8 lea -0x8(%ebp),%esp
116af9: 5b pop %ebx
116afa: 5e pop %esi
116afb: c9 leave
116afc: c3 ret
00115e98 <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
115e98: 55 push %ebp
115e99: 89 e5 mov %esp,%ebp
115e9b: 57 push %edi
115e9c: 56 push %esi
115e9d: 53 push %ebx
115e9e: 83 ec 1c sub $0x1c,%esp
115ea1: 8b 5d 08 mov 0x8(%ebp),%ebx
115ea4: 8b 55 0c mov 0xc(%ebp),%edx
115ea7: 8b 7d 10 mov 0x10(%ebp),%edi
115eaa: 8b 75 18 mov 0x18(%ebp),%esi
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
115ead: 85 db test %ebx,%ebx
115eaf: 74 1b je 115ecc <rtems_port_create+0x34>
return RTEMS_INVALID_NAME;
if ( !id )
115eb1: 85 f6 test %esi,%esi
115eb3: 74 08 je 115ebd <rtems_port_create+0x25>
* id - port id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_port_create(
115eb5: 89 f8 mov %edi,%eax
115eb7: 09 d0 or %edx,%eax
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
115eb9: a8 03 test $0x3,%al
115ebb: 74 1f je 115edc <rtems_port_create+0x44>
!_Addresses_Is_aligned( external_start ) )
return RTEMS_INVALID_ADDRESS;
115ebd: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
115ec2: 8d 65 f4 lea -0xc(%ebp),%esp
115ec5: 5b pop %ebx
115ec6: 5e pop %esi
115ec7: 5f pop %edi
115ec8: c9 leave
115ec9: c3 ret
115eca: 66 90 xchg %ax,%ax
)
{
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
115ecc: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
115ed1: 8d 65 f4 lea -0xc(%ebp),%esp
115ed4: 5b pop %ebx
115ed5: 5e pop %esi
115ed6: 5f pop %edi
115ed7: c9 leave
115ed8: c3 ret
115ed9: 8d 76 00 lea 0x0(%esi),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
115edc: a1 f0 2a 14 00 mov 0x142af0,%eax
115ee1: 40 inc %eax
115ee2: a3 f0 2a 14 00 mov %eax,0x142af0
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
_Objects_Allocate( &_Dual_ported_memory_Information );
115ee7: 83 ec 0c sub $0xc,%esp
115eea: 68 40 29 14 00 push $0x142940
115eef: 89 55 e4 mov %edx,-0x1c(%ebp)
115ef2: e8 51 4f 00 00 call 11ae48 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
115ef7: 83 c4 10 add $0x10,%esp
115efa: 85 c0 test %eax,%eax
115efc: 8b 55 e4 mov -0x1c(%ebp),%edx
115eff: 74 33 je 115f34 <rtems_port_create+0x9c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
115f01: 89 50 10 mov %edx,0x10(%eax)
the_port->external_base = external_start;
115f04: 89 78 14 mov %edi,0x14(%eax)
the_port->length = length - 1;
115f07: 8b 55 14 mov 0x14(%ebp),%edx
115f0a: 4a dec %edx
115f0b: 89 50 18 mov %edx,0x18(%eax)
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
115f0e: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
115f11: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
115f14: 8b 0d 5c 29 14 00 mov 0x14295c,%ecx
115f1a: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
115f1d: 89 58 0c mov %ebx,0xc(%eax)
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
115f20: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
115f22: e8 99 5f 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115f27: 31 c0 xor %eax,%eax
}
115f29: 8d 65 f4 lea -0xc(%ebp),%esp
115f2c: 5b pop %ebx
115f2d: 5e pop %esi
115f2e: 5f pop %edi
115f2f: c9 leave
115f30: c3 ret
115f31: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
_Thread_Enable_dispatch();
115f34: e8 87 5f 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
115f39: b8 05 00 00 00 mov $0x5,%eax
115f3e: eb 82 jmp 115ec2 <rtems_port_create+0x2a>
00115f40 <rtems_port_delete>:
*/
rtems_status_code rtems_port_delete(
rtems_id id
)
{
115f40: 55 push %ebp
115f41: 89 e5 mov %esp,%ebp
115f43: 83 ec 2c sub $0x2c,%esp
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
the_port = _Dual_ported_memory_Get( id, &location );
115f46: 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 );
115f49: 50 push %eax
115f4a: ff 75 08 pushl 0x8(%ebp)
115f4d: 68 40 29 14 00 push $0x142940
115f52: e8 e1 53 00 00 call 11b338 <_Objects_Get>
switch ( location ) {
115f57: 83 c4 10 add $0x10,%esp
115f5a: 8b 4d f4 mov -0xc(%ebp),%ecx
115f5d: 85 c9 test %ecx,%ecx
115f5f: 75 2f jne 115f90 <rtems_port_delete+0x50>
case OBJECTS_LOCAL:
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
115f61: 83 ec 08 sub $0x8,%esp
115f64: 50 push %eax
115f65: 68 40 29 14 00 push $0x142940
115f6a: 89 45 e4 mov %eax,-0x1c(%ebp)
115f6d: e8 52 4f 00 00 call 11aec4 <_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 );
115f72: 58 pop %eax
115f73: 5a pop %edx
115f74: 8b 45 e4 mov -0x1c(%ebp),%eax
115f77: 50 push %eax
115f78: 68 40 29 14 00 push $0x142940
115f7d: e8 3a 52 00 00 call 11b1bc <_Objects_Free>
_Dual_ported_memory_Free( the_port );
_Thread_Enable_dispatch();
115f82: e8 39 5f 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115f87: 83 c4 10 add $0x10,%esp
115f8a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115f8c: c9 leave
115f8d: c3 ret
115f8e: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115f90: b8 04 00 00 00 mov $0x4,%eax
}
115f95: c9 leave
115f96: c3 ret
00115f98 <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
rtems_id id,
void *external,
void **internal
)
{
115f98: 55 push %ebp
115f99: 89 e5 mov %esp,%ebp
115f9b: 56 push %esi
115f9c: 53 push %ebx
115f9d: 83 ec 10 sub $0x10,%esp
115fa0: 8b 75 0c mov 0xc(%ebp),%esi
115fa3: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
115fa6: 85 db test %ebx,%ebx
115fa8: 74 4e je 115ff8 <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 );
115faa: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
115fab: 8d 45 f4 lea -0xc(%ebp),%eax
115fae: 50 push %eax
115faf: ff 75 08 pushl 0x8(%ebp)
115fb2: 68 40 29 14 00 push $0x142940
115fb7: e8 7c 53 00 00 call 11b338 <_Objects_Get>
switch ( location ) {
115fbc: 83 c4 10 add $0x10,%esp
115fbf: 8b 55 f4 mov -0xc(%ebp),%edx
115fc2: 85 d2 test %edx,%edx
115fc4: 74 0e je 115fd4 <rtems_port_external_to_internal+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
115fc6: b8 04 00 00 00 mov $0x4,%eax
}
115fcb: 8d 65 f8 lea -0x8(%ebp),%esp
115fce: 5b pop %ebx
115fcf: 5e pop %esi
115fd0: c9 leave
115fd1: c3 ret
115fd2: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
115fd4: 89 f2 mov %esi,%edx
115fd6: 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 )
115fd9: 3b 50 18 cmp 0x18(%eax),%edx
115fdc: 77 16 ja 115ff4 <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);
115fde: 03 50 10 add 0x10(%eax),%edx
115fe1: 89 13 mov %edx,(%ebx)
*internal = external;
else
*internal = _Addresses_Add_offset( the_port->internal_base,
ending );
_Thread_Enable_dispatch();
115fe3: e8 d8 5e 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
115fe8: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115fea: 8d 65 f8 lea -0x8(%ebp),%esp
115fed: 5b pop %ebx
115fee: 5e pop %esi
115fef: c9 leave
115ff0: c3 ret
115ff1: 8d 76 00 lea 0x0(%esi),%esi
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;
115ff4: 89 33 mov %esi,(%ebx)
115ff6: eb eb jmp 115fe3 <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;
115ff8: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
115ffd: 8d 65 f8 lea -0x8(%ebp),%esp
116000: 5b pop %ebx
116001: 5e pop %esi
116002: c9 leave
116003: c3 ret
00116028 <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
rtems_id id,
void *internal,
void **external
)
{
116028: 55 push %ebp
116029: 89 e5 mov %esp,%ebp
11602b: 56 push %esi
11602c: 53 push %ebx
11602d: 83 ec 10 sub $0x10,%esp
116030: 8b 75 0c mov 0xc(%ebp),%esi
116033: 8b 5d 10 mov 0x10(%ebp),%ebx
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
116036: 85 db test %ebx,%ebx
116038: 74 4e je 116088 <rtems_port_internal_to_external+0x60>
11603a: 51 push %ecx
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
11603b: 8d 45 f4 lea -0xc(%ebp),%eax
11603e: 50 push %eax
11603f: ff 75 08 pushl 0x8(%ebp)
116042: 68 40 29 14 00 push $0x142940
116047: e8 ec 52 00 00 call 11b338 <_Objects_Get>
switch ( location ) {
11604c: 83 c4 10 add $0x10,%esp
11604f: 8b 55 f4 mov -0xc(%ebp),%edx
116052: 85 d2 test %edx,%edx
116054: 74 0e je 116064 <rtems_port_internal_to_external+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116056: b8 04 00 00 00 mov $0x4,%eax
}
11605b: 8d 65 f8 lea -0x8(%ebp),%esp
11605e: 5b pop %ebx
11605f: 5e pop %esi
116060: c9 leave
116061: c3 ret
116062: 66 90 xchg %ax,%ax
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
116064: 89 f2 mov %esi,%edx
116066: 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 )
116069: 3b 50 18 cmp 0x18(%eax),%edx
11606c: 77 16 ja 116084 <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);
11606e: 03 50 14 add 0x14(%eax),%edx
116071: 89 13 mov %edx,(%ebx)
*external = internal;
else
*external = _Addresses_Add_offset( the_port->external_base,
ending );
_Thread_Enable_dispatch();
116073: e8 48 5e 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116078: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11607a: 8d 65 f8 lea -0x8(%ebp),%esp
11607d: 5b pop %ebx
11607e: 5e pop %esi
11607f: c9 leave
116080: c3 ret
116081: 8d 76 00 lea 0x0(%esi),%esi
switch ( location ) {
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
*external = internal;
116084: 89 33 mov %esi,(%ebx)
116086: eb eb jmp 116073 <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;
116088: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11608d: 8d 65 f8 lea -0x8(%ebp),%esp
116090: 5b pop %ebx
116091: 5e pop %esi
116092: c9 leave
116093: c3 ret
00107850 <rtems_print_buffer>:
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
107850: 55 push %ebp
107851: 89 e5 mov %esp,%ebp
107853: 57 push %edi
107854: 56 push %esi
107855: 53 push %ebx
107856: 81 ec 9c 00 00 00 sub $0x9c,%esp
10785c: 8b 75 0c mov 0xc(%ebp),%esi
int i, mod, max;
if ( !length ) return;
10785f: 85 f6 test %esi,%esi
107861: 0f 84 00 01 00 00 je 107967 <rtems_print_buffer+0x117>
mod = length % 16;
107867: 89 f0 mov %esi,%eax
107869: 25 0f 00 00 80 and $0x8000000f,%eax
10786e: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp)
107874: 0f 88 21 02 00 00 js 107a9b <rtems_print_buffer+0x24b>
10787a: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
107880: 89 85 58 ff ff ff mov %eax,-0xa8(%ebp)
max = length - mod;
107886: 29 c6 sub %eax,%esi
107888: 89 b5 5c ff ff ff mov %esi,-0xa4(%ebp)
for ( i=0 ; i<max ; i+=16 )
10788e: 85 f6 test %esi,%esi
107890: 0f 8e c7 00 00 00 jle 10795d <rtems_print_buffer+0x10d>
107896: c7 85 64 ff ff ff 00 movl $0x0,-0x9c(%ebp)
10789d: 00 00 00
1078a0: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx
1078a6: 66 90 xchg %ax,%ax
static inline void Dump_Line(
const unsigned char *buffer,
int length
);
void rtems_print_buffer(
1078a8: 8b 75 08 mov 0x8(%ebp),%esi
1078ab: 03 b5 64 ff ff ff add -0x9c(%ebp),%esi
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
1078b1: c6 85 70 ff ff ff 00 movb $0x0,-0x90(%ebp)
for( i=0 ; i<length ; i++ )
1078b8: 31 ff xor %edi,%edi
1078ba: 66 90 xchg %ax,%ax
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
1078bc: 0f b6 04 3e movzbl (%esi,%edi,1),%eax
1078c0: 50 push %eax
1078c1: 53 push %ebx
1078c2: 68 93 14 12 00 push $0x121493
1078c7: 53 push %ebx
1078c8: e8 ff c5 00 00 call 113ecc <sprintf>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
1078cd: 47 inc %edi
1078ce: 83 c4 10 add $0x10,%esp
1078d1: 83 ff 10 cmp $0x10,%edi
1078d4: 75 e6 jne 1078bc <rtems_print_buffer+0x6c>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
1078d6: 31 c0 xor %eax,%eax
1078d8: b9 ff ff ff ff mov $0xffffffff,%ecx
1078dd: 89 df mov %ebx,%edi
1078df: f2 ae repnz scas %es:(%edi),%al
1078e1: f7 d1 not %ecx
1078e3: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1)
for( i=0 ; i<length ; i++ )
1078ea: 31 ff xor %edi,%edi
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
1078ec: 0f b6 04 3e movzbl (%esi,%edi,1),%eax
1078f0: 8b 15 d4 5c 12 00 mov 0x125cd4,%edx
1078f6: 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,
1078fb: 81 e2 97 00 00 00 and $0x97,%edx
107901: 75 05 jne 107908 <rtems_print_buffer+0xb8>
107903: b8 2e 00 00 00 mov $0x2e,%eax
107908: 50 push %eax
107909: 53 push %ebx
10790a: 68 9b 14 12 00 push $0x12149b
10790f: 53 push %ebx
107910: e8 b7 c5 00 00 call 113ecc <sprintf>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
107915: 47 inc %edi
107916: 83 c4 10 add $0x10,%esp
107919: 83 ff 10 cmp $0x10,%edi
10791c: 75 ce jne 1078ec <rtems_print_buffer+0x9c>
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
10791e: 31 c0 xor %eax,%eax
107920: b9 ff ff ff ff mov $0xffffffff,%ecx
107925: 89 df mov %ebx,%edi
107927: f2 ae repnz scas %es:(%edi),%al
107929: f7 d1 not %ecx
10792b: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax
10792f: 66 c7 00 7c 0a movw $0xa7c,(%eax)
107934: c6 40 02 00 movb $0x0,0x2(%eax)
printk( line_buffer );
107938: 83 ec 0c sub $0xc,%esp
10793b: 53 push %ebx
10793c: e8 3f 18 00 00 call 109180 <printk>
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
107941: 83 85 64 ff ff ff 10 addl $0x10,-0x9c(%ebp)
107948: 83 c4 10 add $0x10,%esp
10794b: 8b 85 64 ff ff ff mov -0x9c(%ebp),%eax
107951: 39 85 5c ff ff ff cmp %eax,-0xa4(%ebp)
107957: 0f 8f 4b ff ff ff jg 1078a8 <rtems_print_buffer+0x58>
Dump_Line( &buffer[ i ], 16 );
if ( mod )
10795d: 8b 8d 60 ff ff ff mov -0xa0(%ebp),%ecx
107963: 85 c9 test %ecx,%ecx
107965: 75 08 jne 10796f <rtems_print_buffer+0x11f>
Dump_Line( &buffer[ max ], mod );
}
107967: 8d 65 f4 lea -0xc(%ebp),%esp
10796a: 5b pop %ebx
10796b: 5e pop %esi
10796c: 5f pop %edi
10796d: c9 leave
10796e: c3 ret
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
10796f: 8b 75 08 mov 0x8(%ebp),%esi
107972: 03 b5 5c ff ff ff add -0xa4(%ebp),%esi
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
107978: c6 85 70 ff ff ff 00 movb $0x0,-0x90(%ebp)
for( i=0 ; i<length ; i++ )
10797f: 8b 95 60 ff ff ff mov -0xa0(%ebp),%edx
107985: 85 d2 test %edx,%edx
107987: 0f 8e 2a 01 00 00 jle 107ab7 <rtems_print_buffer+0x267>
10798d: 31 ff xor %edi,%edi
10798f: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx
107995: 8d 76 00 lea 0x0(%esi),%esi
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
107998: 0f b6 04 3e movzbl (%esi,%edi,1),%eax
10799c: 50 push %eax
10799d: 53 push %ebx
10799e: 68 93 14 12 00 push $0x121493
1079a3: 53 push %ebx
1079a4: e8 23 c5 00 00 call 113ecc <sprintf>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
1079a9: 47 inc %edi
1079aa: 83 c4 10 add $0x10,%esp
1079ad: 39 bd 60 ff ff ff cmp %edi,-0xa0(%ebp)
1079b3: 7f e3 jg 107998 <rtems_print_buffer+0x148>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
1079b5: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp)
1079bc: 0f 8f 02 01 00 00 jg 107ac4 <rtems_print_buffer+0x274><== NEVER TAKEN
1079c2: 8b 95 60 ff ff ff mov -0xa0(%ebp),%edx
strcat( line_buffer, " " );
1079c8: 31 c0 xor %eax,%eax
1079ca: 66 90 xchg %ax,%ax
1079cc: b9 ff ff ff ff mov $0xffffffff,%ecx
1079d1: 89 df mov %ebx,%edi
1079d3: f2 ae repnz scas %es:(%edi),%al
1079d5: f7 d1 not %ecx
1079d7: c7 44 0b ff 20 20 20 movl $0x202020,-0x1(%ebx,%ecx,1)
1079de: 00
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
1079df: 42 inc %edx
1079e0: 83 fa 0f cmp $0xf,%edx
1079e3: 7e e7 jle 1079cc <rtems_print_buffer+0x17c>
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
1079e5: 31 c0 xor %eax,%eax
1079e7: b9 ff ff ff ff mov $0xffffffff,%ecx
1079ec: 89 df mov %ebx,%edi
1079ee: f2 ae repnz scas %es:(%edi),%al
1079f0: f7 d1 not %ecx
1079f2: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1)
for( i=0 ; i<length ; i++ )
1079f9: 8b 85 60 ff ff ff mov -0xa0(%ebp),%eax
1079ff: 85 c0 test %eax,%eax
107a01: 0f 8e a4 00 00 00 jle 107aab <rtems_print_buffer+0x25b>
107a07: 31 ff xor %edi,%edi
107a09: 8d 76 00 lea 0x0(%esi),%esi
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
107a0c: 0f b6 04 3e movzbl (%esi,%edi,1),%eax
107a10: 8b 15 d4 5c 12 00 mov 0x125cd4,%edx
107a16: 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,
107a1b: 81 e2 97 00 00 00 and $0x97,%edx
107a21: 75 05 jne 107a28 <rtems_print_buffer+0x1d8>
107a23: b8 2e 00 00 00 mov $0x2e,%eax
107a28: 50 push %eax
107a29: 53 push %ebx
107a2a: 68 9b 14 12 00 push $0x12149b
107a2f: 53 push %ebx
107a30: e8 97 c4 00 00 call 113ecc <sprintf>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
107a35: 47 inc %edi
107a36: 83 c4 10 add $0x10,%esp
107a39: 39 bd 60 ff ff ff cmp %edi,-0xa0(%ebp)
107a3f: 7f cb jg 107a0c <rtems_print_buffer+0x1bc>
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
107a41: 83 bd 60 ff ff ff 0f cmpl $0xf,-0xa0(%ebp)
107a48: 7f 23 jg 107a6d <rtems_print_buffer+0x21d><== NEVER TAKEN
strcat( line_buffer, " " );
107a4a: ba ff ff ff ff mov $0xffffffff,%edx
107a4f: 31 c0 xor %eax,%eax
107a51: 8b b5 58 ff ff ff mov -0xa8(%ebp),%esi
107a57: 90 nop
107a58: 89 d1 mov %edx,%ecx
107a5a: 89 df mov %ebx,%edi
107a5c: f2 ae repnz scas %es:(%edi),%al
107a5e: f7 d1 not %ecx
107a60: 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++ )
107a67: 46 inc %esi
107a68: 83 fe 0f cmp $0xf,%esi
107a6b: 7e eb jle 107a58 <rtems_print_buffer+0x208>
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
107a6d: 31 c0 xor %eax,%eax
107a6f: b9 ff ff ff ff mov $0xffffffff,%ecx
107a74: 89 df mov %ebx,%edi
107a76: f2 ae repnz scas %es:(%edi),%al
107a78: f7 d1 not %ecx
107a7a: 8d 44 0b ff lea -0x1(%ebx,%ecx,1),%eax
107a7e: 66 c7 00 7c 0a movw $0xa7c,(%eax)
107a83: c6 40 02 00 movb $0x0,0x2(%eax)
printk( line_buffer );
107a87: 83 ec 0c sub $0xc,%esp
107a8a: 53 push %ebx
107a8b: e8 f0 16 00 00 call 109180 <printk>
107a90: 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 );
}
107a93: 8d 65 f4 lea -0xc(%ebp),%esp
107a96: 5b pop %ebx
107a97: 5e pop %esi
107a98: 5f pop %edi
107a99: c9 leave
107a9a: c3 ret
int i, mod, max;
if ( !length ) return;
mod = length % 16;
107a9b: 48 dec %eax
107a9c: 83 c8 f0 or $0xfffffff0,%eax
107a9f: 40 inc %eax
107aa0: 89 85 60 ff ff ff mov %eax,-0xa0(%ebp)
107aa6: e9 cf fd ff ff jmp 10787a <rtems_print_buffer+0x2a>
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
107aab: c7 85 58 ff ff ff 00 movl $0x0,-0xa8(%ebp)
107ab2: 00 00 00
107ab5: eb 93 jmp 107a4a <rtems_print_buffer+0x1fa>
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
107ab7: 31 d2 xor %edx,%edx
107ab9: 8d 9d 70 ff ff ff lea -0x90(%ebp),%ebx
107abf: e9 04 ff ff ff jmp 1079c8 <rtems_print_buffer+0x178>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
107ac4: 31 c0 xor %eax,%eax
107ac6: 83 c9 ff or $0xffffffff,%ecx <== NOT EXECUTED
107ac9: 89 df mov %ebx,%edi <== NOT EXECUTED
107acb: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED
107acd: f7 d1 not %ecx <== NOT EXECUTED
107acf: 66 c7 44 0b ff 7c 00 movw $0x7c,-0x1(%ebx,%ecx,1) <== NOT EXECUTED
107ad6: e9 2c ff ff ff jmp 107a07 <rtems_print_buffer+0x1b7><== NOT EXECUTED
00116b00 <rtems_rate_monotonic_cancel>:
*/
rtems_status_code rtems_rate_monotonic_cancel(
rtems_id id
)
{
116b00: 55 push %ebp
116b01: 89 e5 mov %esp,%ebp
116b03: 53 push %ebx
116b04: 83 ec 18 sub $0x18,%esp
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
116b07: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
116b0a: 50 push %eax
116b0b: ff 75 08 pushl 0x8(%ebp)
116b0e: 68 c0 29 14 00 push $0x1429c0
116b13: e8 20 48 00 00 call 11b338 <_Objects_Get>
116b18: 89 c3 mov %eax,%ebx
switch ( location ) {
116b1a: 83 c4 10 add $0x10,%esp
116b1d: 8b 45 f4 mov -0xc(%ebp),%eax
116b20: 85 c0 test %eax,%eax
116b22: 74 0c je 116b30 <rtems_rate_monotonic_cancel+0x30>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
116b24: b8 04 00 00 00 mov $0x4,%eax
}
116b29: 8b 5d fc mov -0x4(%ebp),%ebx
116b2c: c9 leave
116b2d: c3 ret
116b2e: 66 90 xchg %ax,%ax
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
116b30: a1 98 30 14 00 mov 0x143098,%eax
116b35: 39 43 40 cmp %eax,0x40(%ebx)
116b38: 74 12 je 116b4c <rtems_rate_monotonic_cancel+0x4c>
_Thread_Enable_dispatch();
116b3a: e8 81 53 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
116b3f: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
116b44: 8b 5d fc mov -0x4(%ebp),%ebx
116b47: c9 leave
116b48: c3 ret
116b49: 8d 76 00 lea 0x0(%esi),%esi
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 );
116b4c: 83 ec 0c sub $0xc,%esp
116b4f: 8d 43 10 lea 0x10(%ebx),%eax
116b52: 50 push %eax
116b53: e8 a8 64 00 00 call 11d000 <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
116b58: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx)
_Thread_Enable_dispatch();
116b5f: e8 5c 53 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
116b64: 83 c4 10 add $0x10,%esp
116b67: 31 c0 xor %eax,%eax
116b69: eb be jmp 116b29 <rtems_rate_monotonic_cancel+0x29>
0010c388 <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
10c388: 55 push %ebp
10c389: 89 e5 mov %esp,%ebp
10c38b: 57 push %edi
10c38c: 56 push %esi
10c38d: 53 push %ebx
10c38e: 83 ec 1c sub $0x1c,%esp
10c391: 8b 5d 08 mov 0x8(%ebp),%ebx
10c394: 8b 75 0c mov 0xc(%ebp),%esi
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
10c397: 85 db test %ebx,%ebx
10c399: 0f 84 a9 00 00 00 je 10c448 <rtems_rate_monotonic_create+0xc0>
return RTEMS_INVALID_NAME;
if ( !id )
10c39f: 85 f6 test %esi,%esi
10c3a1: 0f 84 c5 00 00 00 je 10c46c <rtems_rate_monotonic_create+0xe4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c3a7: a1 f0 b1 12 00 mov 0x12b1f0,%eax
10c3ac: 40 inc %eax
10c3ad: a3 f0 b1 12 00 mov %eax,0x12b1f0
* 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 );
10c3b2: 83 ec 0c sub $0xc,%esp
10c3b5: 68 00 b1 12 00 push $0x12b100
10c3ba: e8 21 1f 00 00 call 10e2e0 <_Objects_Allocate>
10c3bf: 89 c2 mov %eax,%edx
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
10c3c1: 83 c4 10 add $0x10,%esp
10c3c4: 85 c0 test %eax,%eax
10c3c6: 0f 84 8c 00 00 00 je 10c458 <rtems_rate_monotonic_create+0xd0>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
10c3cc: a1 98 b7 12 00 mov 0x12b798,%eax
10c3d1: 89 42 40 mov %eax,0x40(%edx)
the_period->state = RATE_MONOTONIC_INACTIVE;
10c3d4: 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;
10c3db: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
10c3e2: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx)
the_watchdog->id = id;
10c3e9: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx)
the_watchdog->user_data = user_data;
10c3f0: 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 );
10c3f7: 8d 42 54 lea 0x54(%edx),%eax
10c3fa: 89 45 e4 mov %eax,-0x1c(%ebp)
10c3fd: b9 38 00 00 00 mov $0x38,%ecx
10c402: 31 c0 xor %eax,%eax
10c404: 8b 7d e4 mov -0x1c(%ebp),%edi
10c407: f3 aa rep stos %al,%es:(%edi)
10c409: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx)
10c410: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx)
10c417: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx)
10c41e: 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 ),
10c425: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10c428: 0f b7 f8 movzwl %ax,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c42b: 8b 0d 1c b1 12 00 mov 0x12b11c,%ecx
10c431: 89 14 b9 mov %edx,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c434: 89 5a 0c mov %ebx,0xc(%edx)
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
10c437: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10c439: e8 c6 2f 00 00 call 10f404 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c43e: 31 c0 xor %eax,%eax
}
10c440: 8d 65 f4 lea -0xc(%ebp),%esp
10c443: 5b pop %ebx
10c444: 5e pop %esi
10c445: 5f pop %edi
10c446: c9 leave
10c447: c3 ret
)
{
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10c448: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c44d: 8d 65 f4 lea -0xc(%ebp),%esp
10c450: 5b pop %ebx
10c451: 5e pop %esi
10c452: 5f pop %edi
10c453: c9 leave
10c454: c3 ret
10c455: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
_Thread_Enable_dispatch();
10c458: e8 a7 2f 00 00 call 10f404 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10c45d: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c462: 8d 65 f4 lea -0xc(%ebp),%esp
10c465: 5b pop %ebx
10c466: 5e pop %esi
10c467: 5f pop %edi
10c468: c9 leave
10c469: c3 ret
10c46a: 66 90 xchg %ax,%ax
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10c46c: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c471: 8d 65 f4 lea -0xc(%ebp),%esp
10c474: 5b pop %ebx
10c475: 5e pop %esi
10c476: 5f pop %edi
10c477: c9 leave
10c478: c3 ret
00112950 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
112950: 55 push %ebp
112951: 89 e5 mov %esp,%ebp
112953: 53 push %ebx
112954: 83 ec 24 sub $0x24,%esp
112957: 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 )
11295a: 85 db test %ebx,%ebx
11295c: 0f 84 92 00 00 00 je 1129f4 <rtems_rate_monotonic_get_status+0xa4>
112962: 50 push %eax
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
112963: 8d 45 f4 lea -0xc(%ebp),%eax
112966: 50 push %eax
112967: ff 75 08 pushl 0x8(%ebp)
11296a: 68 00 b1 12 00 push $0x12b100
11296f: e8 08 bf ff ff call 10e87c <_Objects_Get>
switch ( location ) {
112974: 83 c4 10 add $0x10,%esp
112977: 8b 4d f4 mov -0xc(%ebp),%ecx
11297a: 85 c9 test %ecx,%ecx
11297c: 74 0a je 112988 <rtems_rate_monotonic_get_status+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11297e: b8 04 00 00 00 mov $0x4,%eax
}
112983: 8b 5d fc mov -0x4(%ebp),%ebx
112986: c9 leave
112987: c3 ret
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
112988: 8b 50 40 mov 0x40(%eax),%edx
11298b: 8b 52 08 mov 0x8(%edx),%edx
11298e: 89 13 mov %edx,(%ebx)
status->state = the_period->state;
112990: 8b 50 38 mov 0x38(%eax),%edx
112993: 89 53 04 mov %edx,0x4(%ebx)
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
112996: 85 d2 test %edx,%edx
112998: 75 2a jne 1129c4 <rtems_rate_monotonic_get_status+0x74>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
11299a: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx)
1129a1: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
_Timespec_Set_to_zero( &status->executed_since_last_period );
1129a8: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
1129af: 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();
1129b6: e8 49 ca ff ff call 10f404 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1129bb: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1129bd: 8b 5d fc mov -0x4(%ebp),%ebx
1129c0: c9 leave
1129c1: c3 ret
1129c2: 66 90 xchg %ax,%ax
} else {
/*
* Grab the current status.
*/
valid_status =
1129c4: 52 push %edx
_Rate_monotonic_Get_status(
1129c5: 8d 55 ec lea -0x14(%ebp),%edx
} else {
/*
* Grab the current status.
*/
valid_status =
1129c8: 52 push %edx
_Rate_monotonic_Get_status(
1129c9: 8d 55 e4 lea -0x1c(%ebp),%edx
} else {
/*
* Grab the current status.
*/
valid_status =
1129cc: 52 push %edx
1129cd: 50 push %eax
1129ce: e8 cd 9a ff ff call 10c4a0 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
1129d3: 83 c4 10 add $0x10,%esp
1129d6: 84 c0 test %al,%al
1129d8: 74 26 je 112a00 <rtems_rate_monotonic_get_status+0xb0>
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
1129da: 8b 45 e4 mov -0x1c(%ebp),%eax
1129dd: 8b 55 e8 mov -0x18(%ebp),%edx
1129e0: 89 43 08 mov %eax,0x8(%ebx)
1129e3: 89 53 0c mov %edx,0xc(%ebx)
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
1129e6: 8b 45 ec mov -0x14(%ebp),%eax
1129e9: 8b 55 f0 mov -0x10(%ebp),%edx
1129ec: 89 43 10 mov %eax,0x10(%ebx)
1129ef: 89 53 14 mov %edx,0x14(%ebx)
1129f2: eb c2 jmp 1129b6 <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;
1129f4: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1129f9: 8b 5d fc mov -0x4(%ebp),%ebx
1129fc: c9 leave
1129fd: c3 ret
1129fe: 66 90 xchg %ax,%ax
valid_status =
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
_Thread_Enable_dispatch();
112a00: e8 ff c9 ff ff call 10f404 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
112a05: b8 0b 00 00 00 mov $0xb,%eax
112a0a: e9 74 ff ff ff jmp 112983 <rtems_rate_monotonic_get_status+0x33>
0010c69c <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
10c69c: 55 push %ebp
10c69d: 89 e5 mov %esp,%ebp
10c69f: 57 push %edi
10c6a0: 56 push %esi
10c6a1: 53 push %ebx
10c6a2: 83 ec 30 sub $0x30,%esp
10c6a5: 8b 5d 08 mov 0x8(%ebp),%ebx
10c6a8: 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 );
10c6ab: 8d 45 e4 lea -0x1c(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
10c6ae: 50 push %eax
10c6af: 53 push %ebx
10c6b0: 68 00 b1 12 00 push $0x12b100
10c6b5: e8 c2 21 00 00 call 10e87c <_Objects_Get>
switch ( location ) {
10c6ba: 83 c4 10 add $0x10,%esp
10c6bd: 8b 55 e4 mov -0x1c(%ebp),%edx
10c6c0: 85 d2 test %edx,%edx
10c6c2: 74 10 je 10c6d4 <rtems_rate_monotonic_period+0x38>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c6c4: b8 04 00 00 00 mov $0x4,%eax
}
10c6c9: 8d 65 f4 lea -0xc(%ebp),%esp
10c6cc: 5b pop %ebx
10c6cd: 5e pop %esi
10c6ce: 5f pop %edi
10c6cf: c9 leave
10c6d0: c3 ret
10c6d1: 8d 76 00 lea 0x0(%esi),%esi
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
10c6d4: 8b 15 98 b7 12 00 mov 0x12b798,%edx
10c6da: 39 50 40 cmp %edx,0x40(%eax)
10c6dd: 74 15 je 10c6f4 <rtems_rate_monotonic_period+0x58>
_Thread_Enable_dispatch();
10c6df: e8 20 2d 00 00 call 10f404 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
10c6e4: b8 17 00 00 00 mov $0x17,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c6e9: 8d 65 f4 lea -0xc(%ebp),%esp
10c6ec: 5b pop %ebx
10c6ed: 5e pop %esi
10c6ee: 5f pop %edi
10c6ef: c9 leave
10c6f0: c3 ret
10c6f1: 8d 76 00 lea 0x0(%esi),%esi
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
10c6f4: 85 f6 test %esi,%esi
10c6f6: 75 1c jne 10c714 <rtems_rate_monotonic_period+0x78>
switch ( the_period->state ) {
10c6f8: 8b 40 38 mov 0x38(%eax),%eax
10c6fb: 83 f8 04 cmp $0x4,%eax
10c6fe: 77 6c ja 10c76c <rtems_rate_monotonic_period+0xd0><== NEVER TAKEN
10c700: 8b 04 85 bc 3d 12 00 mov 0x123dbc(,%eax,4),%eax
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
10c707: 89 45 d4 mov %eax,-0x2c(%ebp)
10c70a: e8 f5 2c 00 00 call 10f404 <_Thread_Enable_dispatch>
return( return_value );
10c70f: 8b 45 d4 mov -0x2c(%ebp),%eax
10c712: eb b5 jmp 10c6c9 <rtems_rate_monotonic_period+0x2d>
}
_ISR_Disable( level );
10c714: 9c pushf
10c715: fa cli
10c716: 5f pop %edi
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
10c717: 8b 50 38 mov 0x38(%eax),%edx
10c71a: 85 d2 test %edx,%edx
10c71c: 74 52 je 10c770 <rtems_rate_monotonic_period+0xd4>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
10c71e: 83 fa 02 cmp $0x2,%edx
10c721: 0f 84 9e 00 00 00 je 10c7c5 <rtems_rate_monotonic_period+0x129>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
10c727: 83 fa 04 cmp $0x4,%edx
10c72a: 75 98 jne 10c6c4 <rtems_rate_monotonic_period+0x28><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
10c72c: 83 ec 0c sub $0xc,%esp
10c72f: 50 push %eax
10c730: 89 45 d4 mov %eax,-0x2c(%ebp)
10c733: e8 74 fe ff ff call 10c5ac <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
10c738: 57 push %edi
10c739: 9d popf
the_period->state = RATE_MONOTONIC_ACTIVE;
10c73a: 8b 45 d4 mov -0x2c(%ebp),%eax
10c73d: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
the_period->next_length = length;
10c744: 89 70 3c mov %esi,0x3c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c747: 89 70 1c mov %esi,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c74a: 5b pop %ebx
10c74b: 5e pop %esi
_Watchdog_Insert_ticks( &the_period->Timer, length );
10c74c: 83 c0 10 add $0x10,%eax
10c74f: 50 push %eax
10c750: 68 c0 b2 12 00 push $0x12b2c0
10c755: e8 1e 3b 00 00 call 110278 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10c75a: e8 a5 2c 00 00 call 10f404 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
10c75f: 83 c4 10 add $0x10,%esp
10c762: b8 06 00 00 00 mov $0x6,%eax
10c767: e9 5d ff ff ff jmp 10c6c9 <rtems_rate_monotonic_period+0x2d>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
10c76c: 31 c0 xor %eax,%eax
10c76e: eb 97 jmp 10c707 <rtems_rate_monotonic_period+0x6b><== NOT EXECUTED
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
10c770: 57 push %edi
10c771: 9d popf
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
10c772: 83 ec 0c sub $0xc,%esp
10c775: 50 push %eax
10c776: 89 45 d4 mov %eax,-0x2c(%ebp)
10c779: e8 ba fd ff ff call 10c538 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
10c77e: 8b 45 d4 mov -0x2c(%ebp),%eax
10c781: 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;
10c788: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10c78f: c7 40 2c f4 ca 10 00 movl $0x10caf4,0x2c(%eax)
the_watchdog->id = id;
10c796: 89 58 30 mov %ebx,0x30(%eax)
the_watchdog->user_data = user_data;
10c799: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
10c7a0: 89 70 3c mov %esi,0x3c(%eax)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c7a3: 89 70 1c mov %esi,0x1c(%eax)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c7a6: 5e pop %esi
10c7a7: 5f pop %edi
_Watchdog_Insert_ticks( &the_period->Timer, length );
10c7a8: 83 c0 10 add $0x10,%eax
10c7ab: 50 push %eax
10c7ac: 68 c0 b2 12 00 push $0x12b2c0
10c7b1: e8 c2 3a 00 00 call 110278 <_Watchdog_Insert>
_Thread_Enable_dispatch();
10c7b6: e8 49 2c 00 00 call 10f404 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c7bb: 83 c4 10 add $0x10,%esp
10c7be: 31 c0 xor %eax,%eax
10c7c0: e9 04 ff ff ff jmp 10c6c9 <rtems_rate_monotonic_period+0x2d>
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
10c7c5: 83 ec 0c sub $0xc,%esp
10c7c8: 50 push %eax
10c7c9: 89 45 d4 mov %eax,-0x2c(%ebp)
10c7cc: e8 db fd ff ff call 10c5ac <_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;
10c7d1: 8b 45 d4 mov -0x2c(%ebp),%eax
10c7d4: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax)
the_period->next_length = length;
10c7db: 89 70 3c mov %esi,0x3c(%eax)
_ISR_Enable( level );
10c7de: 57 push %edi
10c7df: 9d popf
_Thread_Executing->Wait.id = the_period->Object.id;
10c7e0: 8b 15 98 b7 12 00 mov 0x12b798,%edx
10c7e6: 8b 48 08 mov 0x8(%eax),%ecx
10c7e9: 89 4a 20 mov %ecx,0x20(%edx)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
10c7ec: 59 pop %ecx
10c7ed: 5b pop %ebx
10c7ee: 68 00 40 00 00 push $0x4000
10c7f3: 52 push %edx
10c7f4: 89 45 d4 mov %eax,-0x2c(%ebp)
10c7f7: e8 2c 34 00 00 call 10fc28 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
10c7fc: 9c pushf
10c7fd: fa cli
10c7fe: 59 pop %ecx
local_state = the_period->state;
10c7ff: 8b 45 d4 mov -0x2c(%ebp),%eax
10c802: 8b 50 38 mov 0x38(%eax),%edx
the_period->state = RATE_MONOTONIC_ACTIVE;
10c805: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax)
_ISR_Enable( level );
10c80c: 51 push %ecx
10c80d: 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 )
10c80e: 83 c4 10 add $0x10,%esp
10c811: 83 fa 03 cmp $0x3,%edx
10c814: 74 0c je 10c822 <rtems_rate_monotonic_period+0x186>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
10c816: e8 e9 2b 00 00 call 10f404 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c81b: 31 c0 xor %eax,%eax
10c81d: e9 a7 fe ff ff jmp 10c6c9 <rtems_rate_monotonic_period+0x2d>
/*
* 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 );
10c822: 57 push %edi
10c823: 57 push %edi
10c824: 68 00 40 00 00 push $0x4000
10c829: ff 35 98 b7 12 00 pushl 0x12b798
10c82f: e8 6c 28 00 00 call 10f0a0 <_Thread_Clear_state>
10c834: 83 c4 10 add $0x10,%esp
10c837: eb dd jmp 10c816 <rtems_rate_monotonic_period+0x17a>
0010c83c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
10c83c: 55 push %ebp
10c83d: 89 e5 mov %esp,%ebp
10c83f: 57 push %edi
10c840: 56 push %esi
10c841: 53 push %ebx
10c842: 81 ec 8c 00 00 00 sub $0x8c,%esp
10c848: 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 )
10c84b: 8b 7d 0c mov 0xc(%ebp),%edi
10c84e: 85 ff test %edi,%edi
10c850: 0f 84 be 00 00 00 je 10c914 <rtems_rate_monotonic_report_statistics_with_plugin+0xd8><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
10c856: 83 ec 08 sub $0x8,%esp
10c859: 68 d0 3d 12 00 push $0x123dd0
10c85e: 56 push %esi
10c85f: ff 55 0c call *0xc(%ebp)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
10c862: 59 pop %ecx
10c863: 5b pop %ebx
10c864: 68 08 3e 12 00 push $0x123e08
10c869: 56 push %esi
10c86a: ff 55 0c call *0xc(%ebp)
(*print)( context, "--- Wall times are in seconds ---\n" );
10c86d: 58 pop %eax
10c86e: 5a pop %edx
10c86f: 68 2c 3e 12 00 push $0x123e2c
10c874: 56 push %esi
10c875: ff 55 0c call *0xc(%ebp)
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
10c878: 5b pop %ebx
10c879: 5f pop %edi
10c87a: 68 50 3e 12 00 push $0x123e50
10c87f: 56 push %esi
10c880: ff 55 0c call *0xc(%ebp)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
10c883: 5a pop %edx
10c884: 59 pop %ecx
10c885: 68 9c 3e 12 00 push $0x123e9c
10c88a: 56 push %esi
10c88b: 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 ;
10c88e: 8b 1d 08 b1 12 00 mov 0x12b108,%ebx
10c894: 83 c4 10 add $0x10,%esp
10c897: 3b 1d 0c b1 12 00 cmp 0x12b10c,%ebx
10c89d: 77 75 ja 10c914 <rtems_rate_monotonic_report_statistics_with_plugin+0xd8><== NEVER TAKEN
10c89f: 8d 7d 88 lea -0x78(%ebp),%edi
10c8a2: eb 09 jmp 10c8ad <rtems_rate_monotonic_report_statistics_with_plugin+0x71>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
10c8a4: 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 ;
10c8a5: 39 1d 0c b1 12 00 cmp %ebx,0x12b10c
10c8ab: 72 67 jb 10c914 <rtems_rate_monotonic_report_statistics_with_plugin+0xd8>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
10c8ad: 83 ec 08 sub $0x8,%esp
10c8b0: 57 push %edi
10c8b1: 53 push %ebx
10c8b2: e8 ed 5f 00 00 call 1128a4 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
10c8b7: 83 c4 10 add $0x10,%esp
10c8ba: 85 c0 test %eax,%eax
10c8bc: 75 e6 jne 10c8a4 <rtems_rate_monotonic_report_statistics_with_plugin+0x68>
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
10c8be: 83 ec 08 sub $0x8,%esp
10c8c1: 8d 45 c0 lea -0x40(%ebp),%eax
10c8c4: 50 push %eax
10c8c5: 53 push %ebx
10c8c6: e8 85 60 00 00 call 112950 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
10c8cb: 83 c4 0c add $0xc,%esp
10c8ce: 8d 55 e3 lea -0x1d(%ebp),%edx
10c8d1: 52 push %edx
10c8d2: 6a 05 push $0x5
10c8d4: ff 75 c0 pushl -0x40(%ebp)
10c8d7: e8 b4 02 00 00 call 10cb90 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
10c8dc: 59 pop %ecx
10c8dd: 58 pop %eax
10c8de: ff 75 8c pushl -0x74(%ebp)
10c8e1: ff 75 88 pushl -0x78(%ebp)
10c8e4: 8d 45 e3 lea -0x1d(%ebp),%eax
10c8e7: 50 push %eax
10c8e8: 53 push %ebx
10c8e9: 68 ee 3d 12 00 push $0x123dee
10c8ee: 56 push %esi
10c8ef: ff 55 0c call *0xc(%ebp)
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
10c8f2: 8b 45 88 mov -0x78(%ebp),%eax
10c8f5: 83 c4 20 add $0x20,%esp
10c8f8: 85 c0 test %eax,%eax
10c8fa: 75 20 jne 10c91c <rtems_rate_monotonic_report_statistics_with_plugin+0xe0>
(*print)( context, "\n" );
10c8fc: 83 ec 08 sub $0x8,%esp
10c8ff: 68 91 1e 12 00 push $0x121e91
10c904: 56 push %esi
10c905: ff 55 0c call *0xc(%ebp)
continue;
10c908: 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++ ) {
10c90b: 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 ;
10c90c: 39 1d 0c b1 12 00 cmp %ebx,0x12b10c
10c912: 73 99 jae 10c8ad <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
}
}
}
10c914: 8d 65 f4 lea -0xc(%ebp),%esp
10c917: 5b pop %ebx
10c918: 5e pop %esi
10c919: 5f pop %edi
10c91a: c9 leave
10c91b: 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 );
10c91c: 52 push %edx
10c91d: 8d 55 d8 lea -0x28(%ebp),%edx
10c920: 52 push %edx
10c921: 50 push %eax
10c922: 8d 45 a0 lea -0x60(%ebp),%eax
10c925: 50 push %eax
10c926: e8 ad 35 00 00 call 10fed8 <_Timespec_Divide_by_integer>
(*print)( context,
10c92b: b9 d3 4d 62 10 mov $0x10624dd3,%ecx
10c930: 8b 45 dc mov -0x24(%ebp),%eax
10c933: f7 e9 imul %ecx
10c935: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c93b: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c941: c1 f8 06 sar $0x6,%eax
10c944: 8b 55 dc mov -0x24(%ebp),%edx
10c947: c1 fa 1f sar $0x1f,%edx
10c94a: 29 d0 sub %edx,%eax
10c94c: 50 push %eax
10c94d: ff 75 d8 pushl -0x28(%ebp)
10c950: 8b 45 9c mov -0x64(%ebp),%eax
10c953: f7 e9 imul %ecx
10c955: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c95b: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c961: c1 f8 06 sar $0x6,%eax
10c964: 8b 55 9c mov -0x64(%ebp),%edx
10c967: c1 fa 1f sar $0x1f,%edx
10c96a: 29 d0 sub %edx,%eax
10c96c: 50 push %eax
10c96d: ff 75 98 pushl -0x68(%ebp)
10c970: 8b 45 94 mov -0x6c(%ebp),%eax
10c973: f7 e9 imul %ecx
10c975: 89 85 70 ff ff ff mov %eax,-0x90(%ebp)
10c97b: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c981: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c987: c1 f8 06 sar $0x6,%eax
10c98a: 8b 55 94 mov -0x6c(%ebp),%edx
10c98d: c1 fa 1f sar $0x1f,%edx
10c990: 29 d0 sub %edx,%eax
10c992: 50 push %eax
10c993: ff 75 90 pushl -0x70(%ebp)
10c996: 68 e8 3e 12 00 push $0x123ee8
10c99b: 56 push %esi
10c99c: 89 4d 84 mov %ecx,-0x7c(%ebp)
10c99f: 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);
10c9a2: 83 c4 2c add $0x2c,%esp
10c9a5: 8d 55 d8 lea -0x28(%ebp),%edx
10c9a8: 52 push %edx
10c9a9: ff 75 88 pushl -0x78(%ebp)
10c9ac: 8d 45 b8 lea -0x48(%ebp),%eax
10c9af: 50 push %eax
10c9b0: e8 23 35 00 00 call 10fed8 <_Timespec_Divide_by_integer>
(*print)( context,
10c9b5: 8b 4d 84 mov -0x7c(%ebp),%ecx
10c9b8: 8b 45 dc mov -0x24(%ebp),%eax
10c9bb: f7 e9 imul %ecx
10c9bd: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c9c3: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c9c9: c1 f8 06 sar $0x6,%eax
10c9cc: 8b 55 dc mov -0x24(%ebp),%edx
10c9cf: c1 fa 1f sar $0x1f,%edx
10c9d2: 29 d0 sub %edx,%eax
10c9d4: 50 push %eax
10c9d5: ff 75 d8 pushl -0x28(%ebp)
10c9d8: 8b 45 b4 mov -0x4c(%ebp),%eax
10c9db: f7 e9 imul %ecx
10c9dd: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10c9e3: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10c9e9: c1 f8 06 sar $0x6,%eax
10c9ec: 8b 55 b4 mov -0x4c(%ebp),%edx
10c9ef: c1 fa 1f sar $0x1f,%edx
10c9f2: 29 d0 sub %edx,%eax
10c9f4: 50 push %eax
10c9f5: ff 75 b0 pushl -0x50(%ebp)
10c9f8: 8b 45 ac mov -0x54(%ebp),%eax
10c9fb: f7 e9 imul %ecx
10c9fd: 89 85 70 ff ff ff mov %eax,-0x90(%ebp)
10ca03: 89 95 74 ff ff ff mov %edx,-0x8c(%ebp)
10ca09: 8b 85 74 ff ff ff mov -0x8c(%ebp),%eax
10ca0f: c1 f8 06 sar $0x6,%eax
10ca12: 8b 55 ac mov -0x54(%ebp),%edx
10ca15: c1 fa 1f sar $0x1f,%edx
10ca18: 29 d0 sub %edx,%eax
10ca1a: 50 push %eax
10ca1b: ff 75 a8 pushl -0x58(%ebp)
10ca1e: 68 08 3f 12 00 push $0x123f08
10ca23: 56 push %esi
10ca24: ff 55 0c call *0xc(%ebp)
10ca27: 83 c4 30 add $0x30,%esp
10ca2a: e9 75 fe ff ff jmp 10c8a4 <rtems_rate_monotonic_report_statistics_with_plugin+0x68>
0010ca48 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
10ca48: 55 push %ebp
10ca49: 89 e5 mov %esp,%ebp
10ca4b: 53 push %ebx
10ca4c: 83 ec 04 sub $0x4,%esp
10ca4f: a1 f0 b1 12 00 mov 0x12b1f0,%eax
10ca54: 40 inc %eax
10ca55: a3 f0 b1 12 00 mov %eax,0x12b1f0
/*
* 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 ;
10ca5a: 8b 1d 08 b1 12 00 mov 0x12b108,%ebx
10ca60: 3b 1d 0c b1 12 00 cmp 0x12b10c,%ebx
10ca66: 77 15 ja 10ca7d <rtems_rate_monotonic_reset_all_statistics+0x35><== NEVER TAKEN
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
10ca68: 83 ec 0c sub $0xc,%esp
10ca6b: 53 push %ebx
10ca6c: e8 17 00 00 00 call 10ca88 <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++ ) {
10ca71: 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 ;
10ca72: 83 c4 10 add $0x10,%esp
10ca75: 39 1d 0c b1 12 00 cmp %ebx,0x12b10c
10ca7b: 73 eb jae 10ca68 <rtems_rate_monotonic_reset_all_statistics+0x20>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
10ca7d: 8b 5d fc mov -0x4(%ebp),%ebx
10ca80: c9 leave
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
10ca81: e9 7e 29 00 00 jmp 10f404 <_Thread_Enable_dispatch>
0010ca88 <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
rtems_id id
)
{
10ca88: 55 push %ebp
10ca89: 89 e5 mov %esp,%ebp
10ca8b: 57 push %edi
10ca8c: 53 push %ebx
10ca8d: 83 ec 14 sub $0x14,%esp
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
10ca90: 8d 45 f4 lea -0xc(%ebp),%eax
10ca93: 50 push %eax
10ca94: ff 75 08 pushl 0x8(%ebp)
10ca97: 68 00 b1 12 00 push $0x12b100
10ca9c: e8 db 1d 00 00 call 10e87c <_Objects_Get>
10caa1: 89 c2 mov %eax,%edx
switch ( location ) {
10caa3: 83 c4 10 add $0x10,%esp
10caa6: 8b 45 f4 mov -0xc(%ebp),%eax
10caa9: 85 c0 test %eax,%eax
10caab: 75 3b jne 10cae8 <rtems_rate_monotonic_reset_statistics+0x60>
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
10caad: 8d 5a 54 lea 0x54(%edx),%ebx
10cab0: b9 38 00 00 00 mov $0x38,%ecx
10cab5: 31 c0 xor %eax,%eax
10cab7: 89 df mov %ebx,%edi
10cab9: f3 aa rep stos %al,%es:(%edi)
10cabb: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx)
10cac2: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx)
10cac9: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx)
10cad0: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx)
_Thread_Enable_dispatch();
10cad7: e8 28 29 00 00 call 10f404 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10cadc: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10cade: 8d 65 f8 lea -0x8(%ebp),%esp
10cae1: 5b pop %ebx
10cae2: 5f pop %edi
10cae3: c9 leave
10cae4: c3 ret
10cae5: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10cae8: b8 04 00 00 00 mov $0x4,%eax
}
10caed: 8d 65 f8 lea -0x8(%ebp),%esp
10caf0: 5b pop %ebx
10caf1: 5f pop %edi
10caf2: c9 leave
10caf3: c3 ret
00117294 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
117294: 55 push %ebp
117295: 89 e5 mov %esp,%ebp
117297: 57 push %edi
117298: 56 push %esi
117299: 53 push %ebx
11729a: 83 ec 1c sub $0x1c,%esp
11729d: 8b 7d 08 mov 0x8(%ebp),%edi
1172a0: 8b 75 0c mov 0xc(%ebp),%esi
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
1172a3: 85 ff test %edi,%edi
1172a5: 0f 84 c1 00 00 00 je 11736c <rtems_region_create+0xd8>
return RTEMS_INVALID_NAME;
if ( !starting_address )
1172ab: 85 f6 test %esi,%esi
1172ad: 0f 84 e1 00 00 00 je 117394 <rtems_region_create+0x100>
return RTEMS_INVALID_ADDRESS;
if ( !id )
1172b3: 8b 45 1c mov 0x1c(%ebp),%eax
1172b6: 85 c0 test %eax,%eax
1172b8: 0f 84 d6 00 00 00 je 117394 <rtems_region_create+0x100>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
1172be: 83 ec 0c sub $0xc,%esp
1172c1: ff 35 a0 2b 14 00 pushl 0x142ba0
1172c7: e8 24 25 00 00 call 1197f0 <_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 );
1172cc: c7 04 24 00 2a 14 00 movl $0x142a00,(%esp)
1172d3: e8 70 3b 00 00 call 11ae48 <_Objects_Allocate>
1172d8: 89 c3 mov %eax,%ebx
the_region = _Region_Allocate();
if ( !the_region )
1172da: 83 c4 10 add $0x10,%esp
1172dd: 85 c0 test %eax,%eax
1172df: 0f 84 bf 00 00 00 je 1173a4 <rtems_region_create+0x110>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
1172e5: ff 75 14 pushl 0x14(%ebp)
1172e8: ff 75 10 pushl 0x10(%ebp)
1172eb: 56 push %esi
1172ec: 8d 40 68 lea 0x68(%eax),%eax
1172ef: 50 push %eax
1172f0: e8 5f 37 00 00 call 11aa54 <_Heap_Initialize>
1172f5: 89 43 5c mov %eax,0x5c(%ebx)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
1172f8: 83 c4 10 add $0x10,%esp
1172fb: 85 c0 test %eax,%eax
1172fd: 74 7d je 11737c <rtems_region_create+0xe8>
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
1172ff: 89 73 50 mov %esi,0x50(%ebx)
the_region->length = length;
117302: 8b 45 10 mov 0x10(%ebp),%eax
117305: 89 43 54 mov %eax,0x54(%ebx)
the_region->page_size = page_size;
117308: 8b 55 14 mov 0x14(%ebp),%edx
11730b: 89 53 58 mov %edx,0x58(%ebx)
the_region->attribute_set = attribute_set;
11730e: 8b 45 18 mov 0x18(%ebp),%eax
117311: 89 43 60 mov %eax,0x60(%ebx)
the_region->number_of_used_blocks = 0;
117314: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx)
_Thread_queue_Initialize(
11731b: 6a 06 push $0x6
11731d: 6a 40 push $0x40
11731f: a8 04 test $0x4,%al
117321: 0f 95 c0 setne %al
117324: 0f b6 c0 movzbl %al,%eax
117327: 50 push %eax
117328: 8d 43 10 lea 0x10(%ebx),%eax
11732b: 50 push %eax
11732c: e8 9f 52 00 00 call 11c5d0 <_Thread_queue_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
117331: 8b 43 08 mov 0x8(%ebx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
117334: 0f b7 c8 movzwl %ax,%ecx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
117337: 8b 15 1c 2a 14 00 mov 0x142a1c,%edx
11733d: 89 1c 8a mov %ebx,(%edx,%ecx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
117340: 89 7b 0c mov %edi,0xc(%ebx)
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
117343: 8b 55 1c mov 0x1c(%ebp),%edx
117346: 89 02 mov %eax,(%edx)
117348: 83 c4 10 add $0x10,%esp
return_status = RTEMS_SUCCESSFUL;
11734b: 31 c0 xor %eax,%eax
}
}
_RTEMS_Unlock_allocator();
11734d: 83 ec 0c sub $0xc,%esp
117350: ff 35 a0 2b 14 00 pushl 0x142ba0
117356: 89 45 e4 mov %eax,-0x1c(%ebp)
117359: e8 da 24 00 00 call 119838 <_API_Mutex_Unlock>
return return_status;
11735e: 83 c4 10 add $0x10,%esp
117361: 8b 45 e4 mov -0x1c(%ebp),%eax
}
117364: 8d 65 f4 lea -0xc(%ebp),%esp
117367: 5b pop %ebx
117368: 5e pop %esi
117369: 5f pop %edi
11736a: c9 leave
11736b: c3 ret
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
11736c: b8 03 00 00 00 mov $0x3,%eax
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
117371: 8d 65 f4 lea -0xc(%ebp),%esp
117374: 5b pop %ebx
117375: 5e pop %esi
117376: 5f pop %edi
117377: c9 leave
117378: c3 ret
117379: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
11737c: 83 ec 08 sub $0x8,%esp
11737f: 53 push %ebx
117380: 68 00 2a 14 00 push $0x142a00
117385: e8 32 3e 00 00 call 11b1bc <_Objects_Free>
11738a: 83 c4 10 add $0x10,%esp
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
_Region_Free( the_region );
return_status = RTEMS_INVALID_SIZE;
11738d: b8 08 00 00 00 mov $0x8,%eax
117392: eb b9 jmp 11734d <rtems_region_create+0xb9>
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
117394: b8 09 00 00 00 mov $0x9,%eax
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
117399: 8d 65 f4 lea -0xc(%ebp),%esp
11739c: 5b pop %ebx
11739d: 5e pop %esi
11739e: 5f pop %edi
11739f: c9 leave
1173a0: c3 ret
1173a1: 8d 76 00 lea 0x0(%esi),%esi
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
return_status = RTEMS_TOO_MANY;
1173a4: b8 05 00 00 00 mov $0x5,%eax
1173a9: eb a2 jmp 11734d <rtems_region_create+0xb9>
001173ac <rtems_region_delete>:
*/
rtems_status_code rtems_region_delete(
rtems_id id
)
{
1173ac: 55 push %ebp
1173ad: 89 e5 mov %esp,%ebp
1173af: 53 push %ebx
1173b0: 83 ec 30 sub $0x30,%esp
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
_RTEMS_Lock_allocator();
1173b3: ff 35 a0 2b 14 00 pushl 0x142ba0
1173b9: e8 32 24 00 00 call 1197f0 <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
1173be: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
1173c1: 8d 45 f4 lea -0xc(%ebp),%eax
1173c4: 50 push %eax
1173c5: ff 75 08 pushl 0x8(%ebp)
1173c8: 68 00 2a 14 00 push $0x142a00
1173cd: e8 2a 3f 00 00 call 11b2fc <_Objects_Get_no_protection>
switch ( location ) {
1173d2: 83 c4 10 add $0x10,%esp
1173d5: 8b 5d f4 mov -0xc(%ebp),%ebx
1173d8: 85 db test %ebx,%ebx
1173da: 74 1c je 1173f8 <rtems_region_delete+0x4c>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
1173dc: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
1173e1: 83 ec 0c sub $0xc,%esp
1173e4: ff 35 a0 2b 14 00 pushl 0x142ba0
1173ea: e8 49 24 00 00 call 119838 <_API_Mutex_Unlock>
return return_status;
}
1173ef: 89 d8 mov %ebx,%eax
1173f1: 8b 5d fc mov -0x4(%ebp),%ebx
1173f4: c9 leave
1173f5: c3 ret
1173f6: 66 90 xchg %ax,%ax
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 )
1173f8: 8b 48 64 mov 0x64(%eax),%ecx
1173fb: 85 c9 test %ecx,%ecx
1173fd: 74 09 je 117408 <rtems_region_delete+0x5c>
return_status = RTEMS_RESOURCE_IN_USE;
1173ff: bb 0c 00 00 00 mov $0xc,%ebx
117404: eb db jmp 1173e1 <rtems_region_delete+0x35>
117406: 66 90 xchg %ax,%ax
else {
_Objects_Close( &_Region_Information, &the_region->Object );
117408: 83 ec 08 sub $0x8,%esp
11740b: 50 push %eax
11740c: 68 00 2a 14 00 push $0x142a00
117411: 89 45 e4 mov %eax,-0x1c(%ebp)
117414: e8 ab 3a 00 00 call 11aec4 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
117419: 58 pop %eax
11741a: 5a pop %edx
11741b: 8b 45 e4 mov -0x1c(%ebp),%eax
11741e: 50 push %eax
11741f: 68 00 2a 14 00 push $0x142a00
117424: e8 93 3d 00 00 call 11b1bc <_Objects_Free>
117429: 83 c4 10 add $0x10,%esp
_Region_Free( the_region );
return_status = RTEMS_SUCCESSFUL;
11742c: 31 db xor %ebx,%ebx
11742e: eb b1 jmp 1173e1 <rtems_region_delete+0x35>
00117430 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
117430: 55 push %ebp
117431: 89 e5 mov %esp,%ebp
117433: 56 push %esi
117434: 53 push %ebx
117435: 83 ec 10 sub $0x10,%esp
117438: 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 )
11743b: 85 db test %ebx,%ebx
11743d: 74 75 je 1174b4 <rtems_region_extend+0x84>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
11743f: 83 ec 0c sub $0xc,%esp
117442: ff 35 a0 2b 14 00 pushl 0x142ba0
117448: e8 a3 23 00 00 call 1197f0 <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
11744d: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
117450: 8d 45 f0 lea -0x10(%ebp),%eax
117453: 50 push %eax
117454: ff 75 08 pushl 0x8(%ebp)
117457: 68 00 2a 14 00 push $0x142a00
11745c: e8 9b 3e 00 00 call 11b2fc <_Objects_Get_no_protection>
117461: 89 c6 mov %eax,%esi
switch ( location ) {
117463: 83 c4 10 add $0x10,%esp
117466: 8b 45 f0 mov -0x10(%ebp),%eax
117469: 85 c0 test %eax,%eax
11746b: 74 1f je 11748c <rtems_region_extend+0x5c>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
11746d: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
117472: 83 ec 0c sub $0xc,%esp
117475: ff 35 a0 2b 14 00 pushl 0x142ba0
11747b: e8 b8 23 00 00 call 119838 <_API_Mutex_Unlock>
return return_status;
117480: 83 c4 10 add $0x10,%esp
}
117483: 89 d8 mov %ebx,%eax
117485: 8d 65 f8 lea -0x8(%ebp),%esp
117488: 5b pop %ebx
117489: 5e pop %esi
11748a: c9 leave
11748b: c3 ret
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
11748c: 8d 45 f4 lea -0xc(%ebp),%eax
11748f: 50 push %eax
117490: ff 75 10 pushl 0x10(%ebp)
117493: 53 push %ebx
117494: 8d 46 68 lea 0x68(%esi),%eax
117497: 50 push %eax
117498: e8 97 2f 00 00 call 11a434 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
11749d: 83 c4 10 add $0x10,%esp
1174a0: 84 c0 test %al,%al
1174a2: 74 20 je 1174c4 <rtems_region_extend+0x94>
the_region->length += amount_extended;
1174a4: 8b 45 f4 mov -0xc(%ebp),%eax
1174a7: 01 46 54 add %eax,0x54(%esi)
the_region->maximum_segment_size += amount_extended;
1174aa: 01 46 5c add %eax,0x5c(%esi)
return_status = RTEMS_SUCCESSFUL;
1174ad: 31 db xor %ebx,%ebx
1174af: eb c1 jmp 117472 <rtems_region_extend+0x42>
1174b1: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
1174b4: bb 09 00 00 00 mov $0x9,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1174b9: 89 d8 mov %ebx,%eax
1174bb: 8d 65 f8 lea -0x8(%ebp),%esp
1174be: 5b pop %ebx
1174bf: 5e pop %esi
1174c0: c9 leave
1174c1: c3 ret
1174c2: 66 90 xchg %ax,%ax
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;
1174c4: bb 09 00 00 00 mov $0x9,%ebx
1174c9: eb a7 jmp 117472 <rtems_region_extend+0x42>
001174cc <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
1174cc: 55 push %ebp
1174cd: 89 e5 mov %esp,%ebp
1174cf: 53 push %ebx
1174d0: 83 ec 14 sub $0x14,%esp
1174d3: 8b 5d 0c mov 0xc(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
1174d6: 85 db test %ebx,%ebx
1174d8: 74 76 je 117550 <rtems_region_get_free_information+0x84>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
1174da: 83 ec 0c sub $0xc,%esp
1174dd: ff 35 a0 2b 14 00 pushl 0x142ba0
1174e3: e8 08 23 00 00 call 1197f0 <_API_Mutex_Lock>
1174e8: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
1174eb: 8d 45 f4 lea -0xc(%ebp),%eax
1174ee: 50 push %eax
1174ef: ff 75 08 pushl 0x8(%ebp)
1174f2: 68 00 2a 14 00 push $0x142a00
1174f7: e8 00 3e 00 00 call 11b2fc <_Objects_Get_no_protection>
switch ( location ) {
1174fc: 83 c4 10 add $0x10,%esp
1174ff: 8b 55 f4 mov -0xc(%ebp),%edx
117502: 85 d2 test %edx,%edx
117504: 74 1e je 117524 <rtems_region_get_free_information+0x58>
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
117506: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
11750b: 83 ec 0c sub $0xc,%esp
11750e: ff 35 a0 2b 14 00 pushl 0x142ba0
117514: e8 1f 23 00 00 call 119838 <_API_Mutex_Unlock>
return return_status;
117519: 83 c4 10 add $0x10,%esp
}
11751c: 89 d8 mov %ebx,%eax
11751e: 8b 5d fc mov -0x4(%ebp),%ebx
117521: c9 leave
117522: c3 ret
117523: 90 nop
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->Used.number = 0;
117524: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
the_info->Used.total = 0;
11752b: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx)
the_info->Used.largest = 0;
117532: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx)
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
117539: 83 ec 08 sub $0x8,%esp
11753c: 53 push %ebx
11753d: 83 c0 68 add $0x68,%eax
117540: 50 push %eax
117541: e8 ea 32 00 00 call 11a830 <_Heap_Get_free_information>
return_status = RTEMS_SUCCESSFUL;
break;
117546: 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;
117549: 31 db xor %ebx,%ebx
break;
11754b: eb be jmp 11750b <rtems_region_get_free_information+0x3f>
11754d: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
117550: bb 09 00 00 00 mov $0x9,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117555: 89 d8 mov %ebx,%eax
117557: 8b 5d fc mov -0x4(%ebp),%ebx
11755a: c9 leave
11755b: c3 ret
001175d4 <rtems_region_get_segment>:
uintptr_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
1175d4: 55 push %ebp
1175d5: 89 e5 mov %esp,%ebp
1175d7: 57 push %edi
1175d8: 56 push %esi
1175d9: 53 push %ebx
1175da: 83 ec 2c sub $0x2c,%esp
1175dd: 8b 75 0c mov 0xc(%ebp),%esi
1175e0: 8b 5d 18 mov 0x18(%ebp),%ebx
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
1175e3: 85 db test %ebx,%ebx
1175e5: 0f 84 a1 00 00 00 je 11768c <rtems_region_get_segment+0xb8>
return RTEMS_INVALID_ADDRESS;
*segment = NULL;
1175eb: c7 03 00 00 00 00 movl $0x0,(%ebx)
if ( size == 0 )
1175f1: 85 f6 test %esi,%esi
1175f3: 75 0f jne 117604 <rtems_region_get_segment+0x30>
return RTEMS_INVALID_SIZE;
1175f5: b8 08 00 00 00 mov $0x8,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
1175fa: 8d 65 f4 lea -0xc(%ebp),%esp
1175fd: 5b pop %ebx
1175fe: 5e pop %esi
1175ff: 5f pop %edi
117600: c9 leave
117601: c3 ret
117602: 66 90 xchg %ax,%ax
*segment = NULL;
if ( size == 0 )
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
117604: 83 ec 0c sub $0xc,%esp
117607: ff 35 a0 2b 14 00 pushl 0x142ba0
11760d: e8 de 21 00 00 call 1197f0 <_API_Mutex_Lock>
executing = _Thread_Executing;
117612: a1 98 30 14 00 mov 0x143098,%eax
117617: 89 45 d4 mov %eax,-0x2c(%ebp)
11761a: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
11761d: 8d 45 e4 lea -0x1c(%ebp),%eax
117620: 50 push %eax
117621: ff 75 08 pushl 0x8(%ebp)
117624: 68 00 2a 14 00 push $0x142a00
117629: e8 ce 3c 00 00 call 11b2fc <_Objects_Get_no_protection>
11762e: 89 c7 mov %eax,%edi
switch ( location ) {
117630: 83 c4 10 add $0x10,%esp
117633: 8b 45 e4 mov -0x1c(%ebp),%eax
117636: 85 c0 test %eax,%eax
117638: 75 2a jne 117664 <rtems_region_get_segment+0x90>
case OBJECTS_LOCAL:
if ( size > the_region->maximum_segment_size )
11763a: 3b 77 5c cmp 0x5c(%edi),%esi
11763d: 76 2d jbe 11766c <rtems_region_get_segment+0x98>
return_status = RTEMS_INVALID_SIZE;
11763f: b8 08 00 00 00 mov $0x8,%eax
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
117644: 83 ec 0c sub $0xc,%esp
117647: ff 35 a0 2b 14 00 pushl 0x142ba0
11764d: 89 45 d0 mov %eax,-0x30(%ebp)
117650: e8 e3 21 00 00 call 119838 <_API_Mutex_Unlock>
return return_status;
117655: 83 c4 10 add $0x10,%esp
117658: 8b 45 d0 mov -0x30(%ebp),%eax
}
11765b: 8d 65 f4 lea -0xc(%ebp),%esp
11765e: 5b pop %ebx
11765f: 5e pop %esi
117660: 5f pop %edi
117661: c9 leave
117662: c3 ret
117663: 90 nop
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
117664: b8 04 00 00 00 mov $0x4,%eax
117669: eb d9 jmp 117644 <rtems_region_get_segment+0x70>
11766b: 90 nop
* @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 );
11766c: 6a 00 push $0x0
11766e: 6a 00 push $0x0
117670: 56 push %esi
RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
Region_Control *the_region,
uintptr_t size
)
{
return _Heap_Allocate( &the_region->Memory, size );
117671: 8d 47 68 lea 0x68(%edi),%eax
117674: 50 push %eax
117675: e8 e6 2b 00 00 call 11a260 <_Heap_Allocate_aligned_with_boundary>
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
11767a: 83 c4 10 add $0x10,%esp
11767d: 85 c0 test %eax,%eax
11767f: 74 17 je 117698 <rtems_region_get_segment+0xc4>
the_region->number_of_used_blocks += 1;
117681: ff 47 64 incl 0x64(%edi)
*segment = the_segment;
117684: 89 03 mov %eax,(%ebx)
return_status = RTEMS_SUCCESSFUL;
117686: 31 c0 xor %eax,%eax
117688: eb ba jmp 117644 <rtems_region_get_segment+0x70>
11768a: 66 90 xchg %ax,%ax
rtems_status_code return_status;
Region_Control *the_region;
void *the_segment;
if ( !segment )
return RTEMS_INVALID_ADDRESS;
11768c: b8 09 00 00 00 mov $0x9,%eax
117691: e9 64 ff ff ff jmp 1175fa <rtems_region_get_segment+0x26>
117696: 66 90 xchg %ax,%ax
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 ) ) {
117698: f6 45 10 01 testb $0x1,0x10(%ebp)
11769c: 74 07 je 1176a5 <rtems_region_get_segment+0xd1>
return_status = RTEMS_UNSATISFIED;
11769e: b8 0d 00 00 00 mov $0xd,%eax
1176a3: eb 9f jmp 117644 <rtems_region_get_segment+0x70>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
1176a5: a1 f0 2a 14 00 mov 0x142af0,%eax
1176aa: 40 inc %eax
1176ab: a3 f0 2a 14 00 mov %eax,0x142af0
* 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();
1176b0: 83 ec 0c sub $0xc,%esp
1176b3: ff 35 a0 2b 14 00 pushl 0x142ba0
1176b9: e8 7a 21 00 00 call 119838 <_API_Mutex_Unlock>
executing->Wait.queue = &the_region->Wait_queue;
1176be: 8d 47 10 lea 0x10(%edi),%eax
1176c1: 8b 55 d4 mov -0x2c(%ebp),%edx
1176c4: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
1176c7: 8b 4d 08 mov 0x8(%ebp),%ecx
1176ca: 89 4a 20 mov %ecx,0x20(%edx)
executing->Wait.count = size;
1176cd: 89 72 24 mov %esi,0x24(%edx)
executing->Wait.return_argument = segment;
1176d0: 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;
1176d3: 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 );
1176da: 83 c4 0c add $0xc,%esp
1176dd: 68 94 c6 11 00 push $0x11c694
1176e2: ff 75 14 pushl 0x14(%ebp)
1176e5: 50 push %eax
1176e6: e8 7d 4c 00 00 call 11c368 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
1176eb: e8 d0 47 00 00 call 11bec0 <_Thread_Enable_dispatch>
return (rtems_status_code) executing->Wait.return_code;
1176f0: 8b 55 d4 mov -0x2c(%ebp),%edx
1176f3: 8b 42 34 mov 0x34(%edx),%eax
1176f6: 83 c4 10 add $0x10,%esp
1176f9: e9 fc fe ff ff jmp 1175fa <rtems_region_get_segment+0x26>
001177b4 <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
1177b4: 55 push %ebp
1177b5: 89 e5 mov %esp,%ebp
1177b7: 56 push %esi
1177b8: 53 push %ebx
1177b9: 83 ec 20 sub $0x20,%esp
1177bc: 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 )
1177bf: 85 db test %ebx,%ebx
1177c1: 0f 84 89 00 00 00 je 117850 <rtems_region_resize_segment+0x9c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
1177c7: 83 ec 0c sub $0xc,%esp
1177ca: ff 35 a0 2b 14 00 pushl 0x142ba0
1177d0: e8 1b 20 00 00 call 1197f0 <_API_Mutex_Lock>
1177d5: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
1177d8: 8d 45 f0 lea -0x10(%ebp),%eax
1177db: 50 push %eax
1177dc: ff 75 08 pushl 0x8(%ebp)
1177df: 68 00 2a 14 00 push $0x142a00
1177e4: e8 13 3b 00 00 call 11b2fc <_Objects_Get_no_protection>
1177e9: 89 c6 mov %eax,%esi
switch ( location ) {
1177eb: 83 c4 10 add $0x10,%esp
1177ee: 8b 45 f0 mov -0x10(%ebp),%eax
1177f1: 85 c0 test %eax,%eax
1177f3: 74 1f je 117814 <rtems_region_resize_segment+0x60>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1177f5: 83 ec 0c sub $0xc,%esp
1177f8: ff 35 a0 2b 14 00 pushl 0x142ba0
1177fe: e8 35 20 00 00 call 119838 <_API_Mutex_Unlock>
return return_status;
117803: 83 c4 10 add $0x10,%esp
117806: b8 04 00 00 00 mov $0x4,%eax
}
11780b: 8d 65 f8 lea -0x8(%ebp),%esp
11780e: 5b pop %ebx
11780f: 5e pop %esi
117810: c9 leave
117811: c3 ret
117812: 66 90 xchg %ax,%ax
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
117814: 83 ec 0c sub $0xc,%esp
117817: 8d 45 f4 lea -0xc(%ebp),%eax
11781a: 50 push %eax
11781b: 8d 45 ec lea -0x14(%ebp),%eax
11781e: 50 push %eax
11781f: ff 75 10 pushl 0x10(%ebp)
117822: ff 75 0c pushl 0xc(%ebp)
117825: 8d 46 68 lea 0x68(%esi),%eax
117828: 50 push %eax
117829: e8 2e 34 00 00 call 11ac5c <_Heap_Resize_block>
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
11782e: 8b 55 ec mov -0x14(%ebp),%edx
117831: 89 13 mov %edx,(%ebx)
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
117833: 83 c4 20 add $0x20,%esp
117836: 85 c0 test %eax,%eax
117838: 75 22 jne 11785c <rtems_region_resize_segment+0xa8>
_Region_Process_queue( the_region ); /* unlocks allocator */
11783a: 83 ec 0c sub $0xc,%esp
11783d: 56 push %esi
11783e: e8 fd 7c 00 00 call 11f540 <_Region_Process_queue>
117843: 83 c4 10 add $0x10,%esp
else
_RTEMS_Unlock_allocator();
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
117846: 31 c0 xor %eax,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117848: 8d 65 f8 lea -0x8(%ebp),%esp
11784b: 5b pop %ebx
11784c: 5e pop %esi
11784d: c9 leave
11784e: c3 ret
11784f: 90 nop
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
return RTEMS_INVALID_ADDRESS;
117850: b8 09 00 00 00 mov $0x9,%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117855: 8d 65 f8 lea -0x8(%ebp),%esp
117858: 5b pop %ebx
117859: 5e pop %esi
11785a: c9 leave
11785b: c3 ret
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
11785c: 83 ec 0c sub $0xc,%esp
11785f: ff 35 a0 2b 14 00 pushl 0x142ba0
117865: 89 45 e4 mov %eax,-0x1c(%ebp)
117868: e8 cb 1f 00 00 call 119838 <_API_Mutex_Unlock>
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
11786d: 83 c4 10 add $0x10,%esp
return RTEMS_UNSATISFIED;
117870: 8b 45 e4 mov -0x1c(%ebp),%eax
117873: 48 dec %eax
117874: 0f 94 c0 sete %al
117877: 0f b6 c0 movzbl %al,%eax
11787a: 8d 04 85 09 00 00 00 lea 0x9(,%eax,4),%eax
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117881: 8d 65 f8 lea -0x8(%ebp),%esp
117884: 5b pop %ebx
117885: 5e pop %esi
117886: c9 leave
117887: c3 ret
00117888 <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
117888: 55 push %ebp
117889: 89 e5 mov %esp,%ebp
11788b: 53 push %ebx
11788c: 83 ec 20 sub $0x20,%esp
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
11788f: ff 35 a0 2b 14 00 pushl 0x142ba0
117895: e8 56 1f 00 00 call 1197f0 <_API_Mutex_Lock>
11789a: 83 c4 0c add $0xc,%esp
the_region = _Region_Get( id, &location );
11789d: 8d 45 f4 lea -0xc(%ebp),%eax
1178a0: 50 push %eax
1178a1: ff 75 08 pushl 0x8(%ebp)
1178a4: 68 00 2a 14 00 push $0x142a00
1178a9: e8 4e 3a 00 00 call 11b2fc <_Objects_Get_no_protection>
1178ae: 89 c3 mov %eax,%ebx
switch ( location ) {
1178b0: 83 c4 10 add $0x10,%esp
1178b3: 8b 45 f4 mov -0xc(%ebp),%eax
1178b6: 85 c0 test %eax,%eax
1178b8: 75 1e jne 1178d8 <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 );
1178ba: 83 ec 08 sub $0x8,%esp
1178bd: ff 75 0c pushl 0xc(%ebp)
1178c0: 8d 43 68 lea 0x68(%ebx),%eax
1178c3: 50 push %eax
1178c4: e8 03 2e 00 00 call 11a6cc <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
1178c9: 83 c4 10 add $0x10,%esp
1178cc: 84 c0 test %al,%al
1178ce: 75 28 jne 1178f8 <rtems_region_return_segment+0x70>
return_status = RTEMS_INVALID_ADDRESS;
1178d0: bb 09 00 00 00 mov $0x9,%ebx
1178d5: eb 06 jmp 1178dd <rtems_region_return_segment+0x55>
1178d7: 90 nop
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
1178d8: bb 04 00 00 00 mov $0x4,%ebx
break;
}
_RTEMS_Unlock_allocator();
1178dd: 83 ec 0c sub $0xc,%esp
1178e0: ff 35 a0 2b 14 00 pushl 0x142ba0
1178e6: e8 4d 1f 00 00 call 119838 <_API_Mutex_Unlock>
return return_status;
1178eb: 83 c4 10 add $0x10,%esp
}
1178ee: 89 d8 mov %ebx,%eax
1178f0: 8b 5d fc mov -0x4(%ebp),%ebx
1178f3: c9 leave
1178f4: c3 ret
1178f5: 8d 76 00 lea 0x0(%esi),%esi
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
1178f8: ff 4b 64 decl 0x64(%ebx)
_Region_Process_queue(the_region); /* unlocks allocator */
1178fb: 83 ec 0c sub $0xc,%esp
1178fe: 53 push %ebx
1178ff: e8 3c 7c 00 00 call 11f540 <_Region_Process_queue>
return RTEMS_SUCCESSFUL;
117904: 83 c4 10 add $0x10,%esp
117907: 31 db xor %ebx,%ebx
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
117909: 89 d8 mov %ebx,%eax
11790b: 8b 5d fc mov -0x4(%ebp),%ebx
11790e: c9 leave
11790f: c3 ret
0010b47c <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
10b47c: 55 push %ebp
10b47d: 89 e5 mov %esp,%ebp
10b47f: 57 push %edi
10b480: 56 push %esi
10b481: 53 push %ebx
10b482: 83 ec 3c sub $0x3c,%esp
10b485: 8b 75 08 mov 0x8(%ebp),%esi
10b488: 8b 5d 10 mov 0x10(%ebp),%ebx
10b48b: 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 ) )
10b48e: 85 f6 test %esi,%esi
10b490: 74 4a je 10b4dc <rtems_semaphore_create+0x60>
return RTEMS_INVALID_NAME;
if ( !id )
10b492: 85 ff test %edi,%edi
10b494: 0f 84 f6 00 00 00 je 10b590 <rtems_semaphore_create+0x114>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
10b49a: 89 da mov %ebx,%edx
10b49c: 81 e2 c0 00 00 00 and $0xc0,%edx
10b4a2: 74 48 je 10b4ec <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);
10b4a4: 89 d8 mov %ebx,%eax
10b4a6: 83 e0 30 and $0x30,%eax
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
10b4a9: 83 f8 10 cmp $0x10,%eax
10b4ac: 74 0e je 10b4bc <rtems_semaphore_create+0x40>
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
10b4ae: b8 0b 00 00 00 mov $0xb,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b4b3: 8d 65 f4 lea -0xc(%ebp),%esp
10b4b6: 5b pop %ebx
10b4b7: 5e pop %esi
10b4b8: 5f pop %edi
10b4b9: c9 leave
10b4ba: c3 ret
10b4bb: 90 nop
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
10b4bc: f6 c3 04 test $0x4,%bl
10b4bf: 74 ed je 10b4ae <rtems_semaphore_create+0x32>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
10b4c1: 81 fa c0 00 00 00 cmp $0xc0,%edx
10b4c7: 74 e5 je 10b4ae <rtems_semaphore_create+0x32>
10b4c9: 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 ) )
10b4ce: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10b4d2: 76 1f jbe 10b4f3 <rtems_semaphore_create+0x77>
return RTEMS_INVALID_NUMBER;
10b4d4: b8 0a 00 00 00 mov $0xa,%eax
10b4d9: eb d8 jmp 10b4b3 <rtems_semaphore_create+0x37>
10b4db: 90 nop
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;
10b4dc: b8 03 00 00 00 mov $0x3,%eax
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10b4e1: 8d 65 f4 lea -0xc(%ebp),%esp
10b4e4: 5b pop %ebx
10b4e5: 5e pop %esi
10b4e6: 5f pop %edi
10b4e7: c9 leave
10b4e8: c3 ret
10b4e9: 8d 76 00 lea 0x0(%esi),%esi
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 ) )
10b4ec: 89 d9 mov %ebx,%ecx
10b4ee: 83 e1 30 and $0x30,%ecx
10b4f1: 75 db jne 10b4ce <rtems_semaphore_create+0x52>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b4f3: a1 50 7e 12 00 mov 0x127e50,%eax
10b4f8: 40 inc %eax
10b4f9: a3 50 7e 12 00 mov %eax,0x127e50
* 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 );
10b4fe: 83 ec 0c sub $0xc,%esp
10b501: 68 a0 7d 12 00 push $0x127da0
10b506: 89 4d c4 mov %ecx,-0x3c(%ebp)
10b509: e8 be 14 00 00 call 10c9cc <_Objects_Allocate>
10b50e: 89 c2 mov %eax,%edx
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
10b510: 83 c4 10 add $0x10,%esp
10b513: 85 c0 test %eax,%eax
10b515: 8b 4d c4 mov -0x3c(%ebp),%ecx
10b518: 0f 84 ba 00 00 00 je 10b5d8 <rtems_semaphore_create+0x15c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
10b51e: 89 58 10 mov %ebx,0x10(%eax)
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
10b521: 85 c9 test %ecx,%ecx
10b523: 74 77 je 10b59c <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;
10b525: 31 c0 xor %eax,%eax
10b527: f6 c3 04 test $0x4,%bl
10b52a: 0f 95 c0 setne %al
10b52d: 89 45 d8 mov %eax,-0x28(%ebp)
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
10b530: 83 f9 10 cmp $0x10,%ecx
10b533: 0f 84 ae 00 00 00 je 10b5e7 <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;
10b539: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp)
the_mutex_attr.only_owner_release = false;
10b540: c6 45 d4 00 movb $0x0,-0x2c(%ebp)
}
mutex_status = _CORE_mutex_Initialize(
10b544: 50 push %eax
10b545: 31 c0 xor %eax,%eax
10b547: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
10b54b: 0f 94 c0 sete %al
10b54e: 50 push %eax
10b54f: 8d 45 d0 lea -0x30(%ebp),%eax
10b552: 50 push %eax
10b553: 8d 42 14 lea 0x14(%edx),%eax
10b556: 50 push %eax
10b557: 89 55 c4 mov %edx,-0x3c(%ebp)
10b55a: e8 65 0c 00 00 call 10c1c4 <_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 ) {
10b55f: 83 c4 10 add $0x10,%esp
10b562: 83 f8 06 cmp $0x6,%eax
10b565: 8b 55 c4 mov -0x3c(%ebp),%edx
10b568: 0f 84 a9 00 00 00 je 10b617 <rtems_semaphore_create+0x19b>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
10b56e: 8b 42 08 mov 0x8(%edx),%eax
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10b571: 0f b7 d8 movzwl %ax,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b574: 8b 0d bc 7d 12 00 mov 0x127dbc,%ecx
10b57a: 89 14 99 mov %edx,(%ecx,%ebx,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10b57d: 89 72 0c mov %esi,0xc(%edx)
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
10b580: 89 07 mov %eax,(%edi)
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
10b582: e8 81 24 00 00 call 10da08 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b587: 31 c0 xor %eax,%eax
10b589: e9 25 ff ff ff jmp 10b4b3 <rtems_semaphore_create+0x37>
10b58e: 66 90 xchg %ax,%ax
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10b590: b8 09 00 00 00 mov $0x9,%eax
10b595: e9 19 ff ff ff jmp 10b4b3 <rtems_semaphore_create+0x37>
10b59a: 66 90 xchg %ax,%ax
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
10b59c: 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;
10b5a3: 31 c0 xor %eax,%eax
10b5a5: f6 c3 04 test $0x4,%bl
10b5a8: 0f 95 c0 setne %al
10b5ab: 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;
10b5ae: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
10b5b5: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)
_CORE_semaphore_Initialize(
10b5bc: 51 push %ecx
10b5bd: ff 75 0c pushl 0xc(%ebp)
10b5c0: 8d 45 e0 lea -0x20(%ebp),%eax
10b5c3: 50 push %eax
10b5c4: 8d 42 14 lea 0x14(%edx),%eax
10b5c7: 50 push %eax
10b5c8: 89 55 c4 mov %edx,-0x3c(%ebp)
10b5cb: e8 84 0e 00 00 call 10c454 <_CORE_semaphore_Initialize>
10b5d0: 83 c4 10 add $0x10,%esp
10b5d3: 8b 55 c4 mov -0x3c(%ebp),%edx
10b5d6: eb 96 jmp 10b56e <rtems_semaphore_create+0xf2>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
10b5d8: e8 2b 24 00 00 call 10da08 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10b5dd: b8 05 00 00 00 mov $0x5,%eax
10b5e2: e9 cc fe ff ff jmp 10b4b3 <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;
10b5e7: 8b 45 14 mov 0x14(%ebp),%eax
10b5ea: 89 45 dc mov %eax,-0x24(%ebp)
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
10b5ed: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp)
the_mutex_attr.only_owner_release = false;
10b5f4: c6 45 d4 00 movb $0x0,-0x2c(%ebp)
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
10b5f8: 83 7d d8 01 cmpl $0x1,-0x28(%ebp)
10b5fc: 0f 85 42 ff ff ff jne 10b544 <rtems_semaphore_create+0xc8>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
10b602: f6 c3 40 test $0x40,%bl
10b605: 74 30 je 10b637 <rtems_semaphore_create+0x1bb>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
10b607: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp)
the_mutex_attr.only_owner_release = true;
10b60e: c6 45 d4 01 movb $0x1,-0x2c(%ebp)
10b612: e9 2d ff ff ff jmp 10b544 <rtems_semaphore_create+0xc8>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
10b617: 83 ec 08 sub $0x8,%esp
10b61a: 52 push %edx
10b61b: 68 a0 7d 12 00 push $0x127da0
10b620: e8 1b 17 00 00 call 10cd40 <_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();
10b625: e8 de 23 00 00 call 10da08 <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
10b62a: 83 c4 10 add $0x10,%esp
10b62d: b8 13 00 00 00 mov $0x13,%eax
10b632: e9 7c fe ff ff jmp 10b4b3 <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 ) ) {
10b637: 81 e3 80 00 00 00 and $0x80,%ebx
10b63d: 0f 84 01 ff ff ff je 10b544 <rtems_semaphore_create+0xc8><== NEVER TAKEN
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
10b643: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp)
the_mutex_attr.only_owner_release = true;
10b64a: c6 45 d4 01 movb $0x1,-0x2c(%ebp)
10b64e: e9 f1 fe ff ff jmp 10b544 <rtems_semaphore_create+0xc8>
0010b654 <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
10b654: 55 push %ebp
10b655: 89 e5 mov %esp,%ebp
10b657: 53 push %ebx
10b658: 83 ec 18 sub $0x18,%esp
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
10b65b: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
10b65e: 50 push %eax
10b65f: ff 75 08 pushl 0x8(%ebp)
10b662: 68 a0 7d 12 00 push $0x127da0
10b667: e8 14 18 00 00 call 10ce80 <_Objects_Get>
10b66c: 89 c3 mov %eax,%ebx
switch ( location ) {
10b66e: 83 c4 10 add $0x10,%esp
10b671: 8b 4d f4 mov -0xc(%ebp),%ecx
10b674: 85 c9 test %ecx,%ecx
10b676: 74 0c je 10b684 <rtems_semaphore_delete+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b678: b8 04 00 00 00 mov $0x4,%eax
}
10b67d: 8b 5d fc mov -0x4(%ebp),%ebx
10b680: c9 leave
10b681: c3 ret
10b682: 66 90 xchg %ax,%ax
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
10b684: 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) ) {
10b687: 83 e0 30 and $0x30,%eax
10b68a: 74 58 je 10b6e4 <rtems_semaphore_delete+0x90>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
10b68c: 8b 53 64 mov 0x64(%ebx),%edx
10b68f: 85 d2 test %edx,%edx
10b691: 75 15 jne 10b6a8 <rtems_semaphore_delete+0x54>
10b693: 83 f8 20 cmp $0x20,%eax
10b696: 74 10 je 10b6a8 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
10b698: e8 6b 23 00 00 call 10da08 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
10b69d: b8 0c 00 00 00 mov $0xc,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b6a2: 8b 5d fc mov -0x4(%ebp),%ebx
10b6a5: c9 leave
10b6a6: c3 ret
10b6a7: 90 nop
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
10b6a8: 50 push %eax
10b6a9: 6a 04 push $0x4
10b6ab: 6a 00 push $0x0
10b6ad: 8d 43 14 lea 0x14(%ebx),%eax
10b6b0: 50 push %eax
10b6b1: e8 02 0b 00 00 call 10c1b8 <_CORE_mutex_Flush>
10b6b6: 83 c4 10 add $0x10,%esp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
10b6b9: 83 ec 08 sub $0x8,%esp
10b6bc: 53 push %ebx
10b6bd: 68 a0 7d 12 00 push $0x127da0
10b6c2: e8 81 13 00 00 call 10ca48 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
10b6c7: 58 pop %eax
10b6c8: 5a pop %edx
10b6c9: 53 push %ebx
10b6ca: 68 a0 7d 12 00 push $0x127da0
10b6cf: e8 6c 16 00 00 call 10cd40 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
10b6d4: e8 2f 23 00 00 call 10da08 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10b6d9: 83 c4 10 add $0x10,%esp
10b6dc: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b6de: 8b 5d fc mov -0x4(%ebp),%ebx
10b6e1: c9 leave
10b6e2: c3 ret
10b6e3: 90 nop
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
10b6e4: 51 push %ecx
10b6e5: 6a 02 push $0x2
10b6e7: 6a 00 push $0x0
10b6e9: 8d 43 14 lea 0x14(%ebx),%eax
10b6ec: 50 push %eax
10b6ed: e8 56 0d 00 00 call 10c448 <_CORE_semaphore_Flush>
10b6f2: 83 c4 10 add $0x10,%esp
10b6f5: eb c2 jmp 10b6b9 <rtems_semaphore_delete+0x65>
0010b6f8 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
10b6f8: 55 push %ebp
10b6f9: 89 e5 mov %esp,%ebp
10b6fb: 57 push %edi
10b6fc: 56 push %esi
10b6fd: 53 push %ebx
10b6fe: 83 ec 1c sub $0x1c,%esp
10b701: 8b 5d 08 mov 0x8(%ebp),%ebx
10b704: 8b 75 0c mov 0xc(%ebp),%esi
10b707: 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 );
10b70a: 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 );
10b70d: 50 push %eax
10b70e: 8d 45 e4 lea -0x1c(%ebp),%eax
10b711: 50 push %eax
10b712: 53 push %ebx
10b713: 68 a0 7d 12 00 push $0x127da0
10b718: e8 0b 17 00 00 call 10ce28 <_Objects_Get_isr_disable>
switch ( location ) {
10b71d: 83 c4 10 add $0x10,%esp
10b720: 8b 4d e4 mov -0x1c(%ebp),%ecx
10b723: 85 c9 test %ecx,%ecx
10b725: 74 0d je 10b734 <rtems_semaphore_obtain+0x3c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b727: b8 04 00 00 00 mov $0x4,%eax
}
10b72c: 8d 65 f4 lea -0xc(%ebp),%esp
10b72f: 5b pop %ebx
10b730: 5e pop %esi
10b731: 5f pop %edi
10b732: c9 leave
10b733: 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) ) {
10b734: f6 40 10 30 testb $0x30,0x10(%eax)
10b738: 74 36 je 10b770 <rtems_semaphore_obtain+0x78>
_CORE_mutex_Seize(
10b73a: 83 ec 0c sub $0xc,%esp
10b73d: ff 75 e0 pushl -0x20(%ebp)
10b740: 57 push %edi
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
10b741: 83 e6 01 and $0x1,%esi
10b744: 83 f6 01 xor $0x1,%esi
10b747: 56 push %esi
10b748: 53 push %ebx
10b749: 83 c0 14 add $0x14,%eax
10b74c: 50 push %eax
10b74d: e8 6a 0b 00 00 call 10c2bc <_CORE_mutex_Seize>
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
10b752: 83 c4 14 add $0x14,%esp
_Thread_Executing->Wait.return_code );
10b755: a1 f8 83 12 00 mov 0x1283f8,%eax
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
10b75a: ff 70 34 pushl 0x34(%eax)
10b75d: e8 12 01 00 00 call 10b874 <_Semaphore_Translate_core_mutex_return_code>
10b762: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10b765: 8d 65 f4 lea -0xc(%ebp),%esp
10b768: 5b pop %ebx
10b769: 5e pop %esi
10b76a: 5f pop %edi
10b76b: c9 leave
10b76c: c3 ret
10b76d: 8d 76 00 lea 0x0(%esi),%esi
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
10b770: 8b 15 f8 83 12 00 mov 0x1283f8,%edx
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
10b776: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx)
if ( the_semaphore->count != 0 ) {
10b77d: 8b 48 5c mov 0x5c(%eax),%ecx
10b780: 85 c9 test %ecx,%ecx
10b782: 75 2c jne 10b7b0 <rtems_semaphore_obtain+0xb8>
the_semaphore->count -= 1;
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
10b784: 83 e6 01 and $0x1,%esi
10b787: 74 33 je 10b7bc <rtems_semaphore_obtain+0xc4>
_ISR_Enable( *level_p );
10b789: ff 75 e0 pushl -0x20(%ebp)
10b78c: 9d popf
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
10b78d: 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(
10b794: 83 ec 0c sub $0xc,%esp
_Thread_Executing->Wait.return_code );
10b797: a1 f8 83 12 00 mov 0x1283f8,%eax
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
10b79c: ff 70 34 pushl 0x34(%eax)
10b79f: e8 e0 00 00 00 call 10b884 <_Semaphore_Translate_core_semaphore_return_code>
10b7a4: 83 c4 10 add $0x10,%esp
break;
}
return RTEMS_INVALID_ID;
}
10b7a7: 8d 65 f4 lea -0xc(%ebp),%esp
10b7aa: 5b pop %ebx
10b7ab: 5e pop %esi
10b7ac: 5f pop %edi
10b7ad: c9 leave
10b7ae: c3 ret
10b7af: 90 nop
/* 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;
10b7b0: 49 dec %ecx
10b7b1: 89 48 5c mov %ecx,0x5c(%eax)
_ISR_Enable( *level_p );
10b7b4: ff 75 e0 pushl -0x20(%ebp)
10b7b7: 9d popf
10b7b8: eb da jmp 10b794 <rtems_semaphore_obtain+0x9c>
10b7ba: 66 90 xchg %ax,%ax
10b7bc: 8b 0d 50 7e 12 00 mov 0x127e50,%ecx
10b7c2: 41 inc %ecx
10b7c3: 89 0d 50 7e 12 00 mov %ecx,0x127e50
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;
10b7c9: 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;
10b7d0: 83 c0 14 add $0x14,%eax
10b7d3: 89 42 44 mov %eax,0x44(%edx)
executing->Wait.id = id;
10b7d6: 89 5a 20 mov %ebx,0x20(%edx)
_ISR_Enable( *level_p );
10b7d9: ff 75 e0 pushl -0x20(%ebp)
10b7dc: 9d popf
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
10b7dd: 52 push %edx
10b7de: 68 dc e1 10 00 push $0x10e1dc
10b7e3: 57 push %edi
10b7e4: 50 push %eax
10b7e5: e8 c6 26 00 00 call 10deb0 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10b7ea: e8 19 22 00 00 call 10da08 <_Thread_Enable_dispatch>
10b7ef: 83 c4 10 add $0x10,%esp
10b7f2: eb a0 jmp 10b794 <rtems_semaphore_obtain+0x9c>
0010b7f4 <rtems_semaphore_release>:
#endif
rtems_status_code rtems_semaphore_release(
rtems_id id
)
{
10b7f4: 55 push %ebp
10b7f5: 89 e5 mov %esp,%ebp
10b7f7: 53 push %ebx
10b7f8: 83 ec 18 sub $0x18,%esp
10b7fb: 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 );
10b7fe: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
10b801: 50 push %eax
10b802: 53 push %ebx
10b803: 68 a0 7d 12 00 push $0x127da0
10b808: e8 73 16 00 00 call 10ce80 <_Objects_Get>
switch ( location ) {
10b80d: 83 c4 10 add $0x10,%esp
10b810: 8b 55 f4 mov -0xc(%ebp),%edx
10b813: 85 d2 test %edx,%edx
10b815: 74 0d je 10b824 <rtems_semaphore_release+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10b817: b8 04 00 00 00 mov $0x4,%eax
}
10b81c: 8b 5d fc mov -0x4(%ebp),%ebx
10b81f: c9 leave
10b820: c3 ret
10b821: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
10b824: f6 40 10 30 testb $0x30,0x10(%eax)
10b828: 75 26 jne 10b850 <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(
10b82a: 52 push %edx
10b82b: 6a 00 push $0x0
10b82d: 53 push %ebx
10b82e: 83 c0 14 add $0x14,%eax
10b831: 50 push %eax
10b832: e8 5d 0c 00 00 call 10c494 <_CORE_semaphore_Surrender>
10b837: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.semaphore,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10b839: e8 ca 21 00 00 call 10da08 <_Thread_Enable_dispatch>
return
10b83e: 89 1c 24 mov %ebx,(%esp)
10b841: e8 3e 00 00 00 call 10b884 <_Semaphore_Translate_core_semaphore_return_code>
10b846: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b849: 8b 5d fc mov -0x4(%ebp),%ebx
10b84c: c9 leave
10b84d: c3 ret
10b84e: 66 90 xchg %ax,%ax
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
mutex_status = _CORE_mutex_Surrender(
10b850: 51 push %ecx
10b851: 6a 00 push $0x0
10b853: 53 push %ebx
10b854: 83 c0 14 add $0x14,%eax
10b857: 50 push %eax
10b858: e8 ff 0a 00 00 call 10c35c <_CORE_mutex_Surrender>
10b85d: 89 c3 mov %eax,%ebx
&the_semaphore->Core_control.mutex,
id,
MUTEX_MP_SUPPORT
);
_Thread_Enable_dispatch();
10b85f: e8 a4 21 00 00 call 10da08 <_Thread_Enable_dispatch>
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
10b864: 89 1c 24 mov %ebx,(%esp)
10b867: e8 08 00 00 00 call 10b874 <_Semaphore_Translate_core_mutex_return_code>
10b86c: 83 c4 10 add $0x10,%esp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10b86f: 8b 5d fc mov -0x4(%ebp),%ebx
10b872: c9 leave
10b873: c3 ret
00117da8 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
117da8: 55 push %ebp
117da9: 89 e5 mov %esp,%ebp
117dab: 53 push %ebx
117dac: 83 ec 14 sub $0x14,%esp
117daf: 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 )
117db2: 85 db test %ebx,%ebx
117db4: 75 0a jne 117dc0 <rtems_signal_send+0x18>
return RTEMS_INVALID_NUMBER;
117db6: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117dbb: 8b 5d fc mov -0x4(%ebp),%ebx
117dbe: c9 leave
117dbf: c3 ret
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
117dc0: 83 ec 08 sub $0x8,%esp
117dc3: 8d 45 f4 lea -0xc(%ebp),%eax
117dc6: 50 push %eax
117dc7: ff 75 08 pushl 0x8(%ebp)
117dca: e8 15 41 00 00 call 11bee4 <_Thread_Get>
switch ( location ) {
117dcf: 83 c4 10 add $0x10,%esp
117dd2: 8b 55 f4 mov -0xc(%ebp),%edx
117dd5: 85 d2 test %edx,%edx
117dd7: 74 0b je 117de4 <rtems_signal_send+0x3c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
117dd9: b8 04 00 00 00 mov $0x4,%eax
}
117dde: 8b 5d fc mov -0x4(%ebp),%ebx
117de1: c9 leave
117de2: c3 ret
117de3: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
117de4: 8b 90 e8 00 00 00 mov 0xe8(%eax),%edx
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
117dea: 8b 4a 0c mov 0xc(%edx),%ecx
117ded: 85 c9 test %ecx,%ecx
117def: 74 3f je 117e30 <rtems_signal_send+0x88>
if ( asr->is_enabled ) {
117df1: 80 7a 08 00 cmpb $0x0,0x8(%edx)
117df5: 74 25 je 117e1c <rtems_signal_send+0x74>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
117df7: 9c pushf
117df8: fa cli
117df9: 59 pop %ecx
*signal_set |= signals;
117dfa: 09 5a 14 or %ebx,0x14(%edx)
_ISR_Enable( _level );
117dfd: 51 push %ecx
117dfe: 9d popf
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
117dff: 8b 15 94 30 14 00 mov 0x143094,%edx
117e05: 85 d2 test %edx,%edx
117e07: 74 1b je 117e24 <rtems_signal_send+0x7c>
117e09: 3b 05 98 30 14 00 cmp 0x143098,%eax
117e0f: 75 13 jne 117e24 <rtems_signal_send+0x7c><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
117e11: c6 05 a4 30 14 00 01 movb $0x1,0x1430a4
117e18: eb 0a jmp 117e24 <rtems_signal_send+0x7c>
117e1a: 66 90 xchg %ax,%ax
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
117e1c: 9c pushf
117e1d: fa cli
117e1e: 58 pop %eax
*signal_set |= signals;
117e1f: 09 5a 18 or %ebx,0x18(%edx)
_ISR_Enable( _level );
117e22: 50 push %eax
117e23: 9d popf
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
117e24: e8 97 40 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
117e29: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
117e2b: 8b 5d fc mov -0x4(%ebp),%ebx
117e2e: c9 leave
117e2f: c3 ret
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
117e30: e8 8b 40 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
117e35: b8 0b 00 00 00 mov $0xb,%eax
117e3a: e9 7c ff ff ff jmp 117dbb <rtems_signal_send+0x13>
00108010 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
108010: 55 push %ebp
108011: 89 e5 mov %esp,%ebp
108013: 57 push %edi
108014: 56 push %esi
108015: 8b 45 08 mov 0x8(%ebp),%eax
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
108018: 8b 48 08 mov 0x8(%eax),%ecx
10801b: 85 c9 test %ecx,%ecx
10801d: 74 15 je 108034 <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;
10801f: 8b b8 bc 00 00 00 mov 0xbc(%eax),%edi
108025: 83 c7 08 add $0x8,%edi
108028: be c0 a9 12 00 mov $0x12a9c0,%esi
10802d: b9 04 00 00 00 mov $0x4,%ecx
108032: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
}
108034: 5e pop %esi
108035: 5f pop %edi
108036: c9 leave
108037: c3 ret
00107fe8 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
107fe8: 55 push %ebp
107fe9: 89 e5 mov %esp,%ebp
107feb: 57 push %edi
107fec: 8b 7d 0c mov 0xc(%ebp),%edi
Stack_check_Initialize();
107fef: e8 88 ff ff ff call 107f7c <Stack_check_Initialize>
if (the_thread)
107ff4: 85 ff test %edi,%edi
107ff6: 74 12 je 10800a <rtems_stack_checker_create_extension+0x22><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
107ff8: 8b 8f b8 00 00 00 mov 0xb8(%edi),%ecx
107ffe: 8b 97 bc 00 00 00 mov 0xbc(%edi),%edx
108004: b0 a5 mov $0xa5,%al
108006: 89 d7 mov %edx,%edi
108008: f3 aa rep stos %al,%es:(%edi)
return true;
}
10800a: b0 01 mov $0x1,%al
10800c: 5f pop %edi
10800d: c9 leave
10800e: c3 ret
0010814c <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
10814c: 55 push %ebp
10814d: 89 e5 mov %esp,%ebp
10814f: 57 push %edi
108150: 56 push %esi
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
108151: a1 78 b1 12 00 mov 0x12b178,%eax
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
108156: 8b b0 bc 00 00 00 mov 0xbc(%eax),%esi
10815c: 39 f5 cmp %esi,%ebp
10815e: 72 3c jb 10819c <rtems_stack_checker_is_blown+0x50><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
108160: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax
108166: 8d 04 06 lea (%esi,%eax,1),%eax
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
108169: 39 c5 cmp %eax,%ebp
10816b: 0f 96 c0 setbe %al
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
10816e: 8b 15 68 a6 12 00 mov 0x12a668,%edx
108174: 85 d2 test %edx,%edx
108176: 74 30 je 1081a8 <rtems_stack_checker_is_blown+0x5c><== NEVER TAKEN
pattern_ok = (!memcmp(
108178: 83 c6 08 add $0x8,%esi
10817b: bf c0 a9 12 00 mov $0x12a9c0,%edi
108180: b9 10 00 00 00 mov $0x10,%ecx
108185: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
108187: 0f 94 c2 sete %dl
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
10818a: 84 c0 test %al,%al
10818c: 74 1e je 1081ac <rtems_stack_checker_is_blown+0x60><== NEVER TAKEN
10818e: 84 d2 test %dl,%dl
108190: 74 1a je 1081ac <rtems_stack_checker_is_blown+0x60><== NEVER TAKEN
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
108192: 31 c0 xor %eax,%eax
108194: 8d 65 f8 lea -0x8(%ebp),%esp
108197: 5e pop %esi
108198: 5f pop %edi
108199: c9 leave
10819a: c3 ret
10819b: 90 nop
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
10819c: 31 c0 xor %eax,%eax
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
10819e: 8b 15 68 a6 12 00 mov 0x12a668,%edx <== NOT EXECUTED
1081a4: 85 d2 test %edx,%edx <== NOT EXECUTED
1081a6: 75 d0 jne 108178 <rtems_stack_checker_is_blown+0x2c><== NOT EXECUTED
*/
bool rtems_stack_checker_is_blown( void )
{
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
bool sp_ok;
bool pattern_ok = true;
1081a8: b2 01 mov $0x1,%dl <== NOT EXECUTED
1081aa: eb de jmp 10818a <rtems_stack_checker_is_blown+0x3e><== NOT EXECUTED
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
1081ac: 57 push %edi <== NOT EXECUTED
1081ad: 57 push %edi <== NOT EXECUTED
1081ae: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
1081b1: 52 push %edx <== NOT EXECUTED
1081b2: ff 35 78 b1 12 00 pushl 0x12b178 <== NOT EXECUTED
1081b8: e8 7b fe ff ff call 108038 <Stack_check_report_blown_task><== NOT EXECUTED
00108228 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
108228: 55 push %ebp <== NOT EXECUTED
108229: 89 e5 mov %esp,%ebp <== NOT EXECUTED
10822b: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
10822e: 68 64 9c 10 00 push $0x109c64 <== NOT EXECUTED
108233: 6a 00 push $0x0 <== NOT EXECUTED
108235: e8 86 ff ff ff call 1081c0 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
10823a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10823d: c9 leave <== NOT EXECUTED
10823e: c3 ret <== NOT EXECUTED
001081c0 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
1081c0: 55 push %ebp <== NOT EXECUTED
1081c1: 89 e5 mov %esp,%ebp <== NOT EXECUTED
1081c3: 56 push %esi <== NOT EXECUTED
1081c4: 53 push %ebx <== NOT EXECUTED
1081c5: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED
1081c8: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED
if ( !print )
1081cb: 85 db test %ebx,%ebx <== NOT EXECUTED
1081cd: 74 50 je 10821f <rtems_stack_checker_report_usage_with_plugin+0x5f><== NOT EXECUTED
return;
print_context = context;
1081cf: 89 35 60 a6 12 00 mov %esi,0x12a660 <== NOT EXECUTED
print_handler = print;
1081d5: 89 1d 64 a6 12 00 mov %ebx,0x12a664 <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
1081db: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
1081de: 68 c8 3e 12 00 push $0x123ec8 <== NOT EXECUTED
1081e3: 56 push %esi <== NOT EXECUTED
1081e4: ff d3 call *%ebx <== NOT EXECUTED
(*print)( context,
1081e6: 59 pop %ecx <== NOT EXECUTED
1081e7: 58 pop %eax <== NOT EXECUTED
1081e8: 68 4c 3f 12 00 push $0x123f4c <== NOT EXECUTED
1081ed: 56 push %esi <== NOT EXECUTED
1081ee: 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 );
1081f0: c7 04 24 10 7e 10 00 movl $0x107e10,(%esp) <== NOT EXECUTED
1081f7: e8 cc 70 00 00 call 10f2c8 <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);
1081fc: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED
108203: e8 08 fc ff ff call 107e10 <Stack_check_Dump_threads_usage><== NOT EXECUTED
#endif
print_context = NULL;
108208: c7 05 60 a6 12 00 00 movl $0x0,0x12a660 <== NOT EXECUTED
10820f: 00 00 00
print_handler = NULL;
108212: c7 05 64 a6 12 00 00 movl $0x0,0x12a664 <== NOT EXECUTED
108219: 00 00 00
10821c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
10821f: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
108222: 5b pop %ebx <== NOT EXECUTED
108223: 5e pop %esi <== NOT EXECUTED
108224: c9 leave <== NOT EXECUTED
108225: c3 ret <== NOT EXECUTED
001080f4 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
1080f4: 55 push %ebp
1080f5: 89 e5 mov %esp,%ebp
1080f7: 57 push %edi
1080f8: 56 push %esi
1080f9: 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 = Stack_check_Get_pattern_area(the_stack);
1080fc: 8b 90 bc 00 00 00 mov 0xbc(%eax),%edx
108102: 8d 72 08 lea 0x8(%edx),%esi
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
108105: 39 d5 cmp %edx,%ebp
108107: 72 0a jb 108113 <rtems_stack_checker_switch_extension+0x1f><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
108109: 03 90 b8 00 00 00 add 0xb8(%eax),%edx
10810f: 39 d5 cmp %edx,%ebp
108111: 76 1d jbe 108130 <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,
108113: bf c0 a9 12 00 mov $0x12a9c0,%edi <== NOT EXECUTED
108118: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED
10811d: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED
10811f: 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 );
108122: 56 push %esi <== NOT EXECUTED
108123: 56 push %esi <== NOT EXECUTED
108124: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED
108127: 52 push %edx <== NOT EXECUTED
108128: 50 push %eax <== NOT EXECUTED
108129: e8 0a ff ff ff call 108038 <Stack_check_report_blown_task><== NOT EXECUTED
10812e: 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,
108130: bf c0 a9 12 00 mov $0x12a9c0,%edi
108135: b9 10 00 00 00 mov $0x10,%ecx
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
10813a: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
10813c: 75 07 jne 108145 <rtems_stack_checker_switch_extension+0x51><== NEVER TAKEN
Stack_check_report_blown_task( running, pattern_ok );
}
}
10813e: 8d 65 f8 lea -0x8(%ebp),%esp
108141: 5e pop %esi
108142: 5f pop %edi
108143: c9 leave
108144: 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 ) {
108145: 31 d2 xor %edx,%edx <== NOT EXECUTED
108147: eb d9 jmp 108122 <rtems_stack_checker_switch_extension+0x2e><== NOT EXECUTED
00110bc0 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
110bc0: 55 push %ebp
110bc1: 89 e5 mov %esp,%ebp
110bc3: 57 push %edi
110bc4: 56 push %esi
110bc5: 53 push %ebx
110bc6: 83 ec 2c sub $0x2c,%esp
110bc9: 8b 75 08 mov 0x8(%ebp),%esi
110bcc: 8b 5d 0c mov 0xc(%ebp),%ebx
110bcf: 8b 7d 10 mov 0x10(%ebp),%edi
double result;
char *end;
if ( !n )
110bd2: 85 db test %ebx,%ebx
110bd4: 0f 84 b2 00 00 00 je 110c8c <rtems_string_to_double+0xcc>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110bda: e8 29 2f 00 00 call 113b08 <__errno>
110bdf: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110be5: c7 03 00 00 00 00 movl $0x0,(%ebx)
110beb: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtod( s, &end );
110bf2: 83 ec 08 sub $0x8,%esp
110bf5: 8d 45 e4 lea -0x1c(%ebp),%eax
110bf8: 50 push %eax
110bf9: 56 push %esi
110bfa: e8 09 59 00 00 call 116508 <strtod>
if ( endptr )
110bff: 83 c4 10 add $0x10,%esp
110c02: 85 ff test %edi,%edi
110c04: 0f 84 92 00 00 00 je 110c9c <rtems_string_to_double+0xdc>
*endptr = end;
110c0a: 8b 45 e4 mov -0x1c(%ebp),%eax
110c0d: 89 07 mov %eax,(%edi)
if ( end == s )
110c0f: 39 c6 cmp %eax,%esi
110c11: 74 69 je 110c7c <rtems_string_to_double+0xbc>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110c13: dd 5d c8 fstpl -0x38(%ebp)
110c16: e8 ed 2e 00 00 call 113b08 <__errno>
110c1b: 83 38 22 cmpl $0x22,(%eax)
110c1e: dd 45 c8 fldl -0x38(%ebp)
110c21: 74 0d je 110c30 <rtems_string_to_double+0x70>
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
110c23: dd 1b fstpl (%ebx)
return RTEMS_SUCCESSFUL;
110c25: 31 c0 xor %eax,%eax
}
110c27: 8d 65 f4 lea -0xc(%ebp),%esp
110c2a: 5b pop %ebx
110c2b: 5e pop %esi
110c2c: 5f pop %edi
110c2d: c9 leave
110c2e: c3 ret
110c2f: 90 nop
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110c30: d9 ee fldz
110c32: d9 c9 fxch %st(1)
110c34: dd e1 fucom %st(1)
110c36: df e0 fnstsw %ax
110c38: dd d9 fstp %st(1)
110c3a: 80 e4 45 and $0x45,%ah
110c3d: 80 fc 40 cmp $0x40,%ah
110c40: 74 26 je 110c68 <rtems_string_to_double+0xa8><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
110c42: dd 05 50 62 12 00 fldl 0x126250
110c48: d9 c9 fxch %st(1)
110c4a: dd e1 fucom %st(1)
110c4c: df e0 fnstsw %ax
110c4e: dd d9 fstp %st(1)
110c50: f6 c4 45 test $0x45,%ah
110c53: 74 17 je 110c6c <rtems_string_to_double+0xac><== ALWAYS TAKEN
110c55: dd 05 58 62 12 00 fldl 0x126258 <== NOT EXECUTED
110c5b: dd e9 fucomp %st(1) <== NOT EXECUTED
110c5d: df e0 fnstsw %ax <== NOT EXECUTED
110c5f: f6 c4 45 test $0x45,%ah <== NOT EXECUTED
110c62: 75 bf jne 110c23 <rtems_string_to_double+0x63><== NOT EXECUTED
110c64: dd d8 fstp %st(0) <== NOT EXECUTED
110c66: eb 06 jmp 110c6e <rtems_string_to_double+0xae><== NOT EXECUTED
110c68: dd d8 fstp %st(0) <== NOT EXECUTED
110c6a: eb 02 jmp 110c6e <rtems_string_to_double+0xae><== NOT EXECUTED
110c6c: dd d8 fstp %st(0)
return RTEMS_INVALID_NUMBER;
110c6e: b8 0a 00 00 00 mov $0xa,%eax
*n = result;
return RTEMS_SUCCESSFUL;
}
110c73: 8d 65 f4 lea -0xc(%ebp),%esp
110c76: 5b pop %ebx
110c77: 5e pop %esi
110c78: 5f pop %edi
110c79: c9 leave
110c7a: c3 ret
110c7b: 90 nop
110c7c: dd d8 fstp %st(0)
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
110c7e: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
110c83: 8d 65 f4 lea -0xc(%ebp),%esp
110c86: 5b pop %ebx
110c87: 5e pop %esi
110c88: 5f pop %edi
110c89: c9 leave
110c8a: c3 ret
110c8b: 90 nop
{
double result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110c8c: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
110c91: 8d 65 f4 lea -0xc(%ebp),%esp
110c94: 5b pop %ebx
110c95: 5e pop %esi
110c96: 5f pop %edi
110c97: c9 leave
110c98: c3 ret
110c99: 8d 76 00 lea 0x0(%esi),%esi
errno = 0;
*n = 0;
result = strtod( s, &end );
if ( endptr )
110c9c: 8b 45 e4 mov -0x1c(%ebp),%eax
110c9f: e9 6b ff ff ff jmp 110c0f <rtems_string_to_double+0x4f>
00110ca4 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
110ca4: 55 push %ebp
110ca5: 89 e5 mov %esp,%ebp
110ca7: 57 push %edi
110ca8: 56 push %esi
110ca9: 53 push %ebx
110caa: 83 ec 2c sub $0x2c,%esp
110cad: 8b 75 08 mov 0x8(%ebp),%esi
110cb0: 8b 5d 0c mov 0xc(%ebp),%ebx
110cb3: 8b 7d 10 mov 0x10(%ebp),%edi
float result;
char *end;
if ( !n )
110cb6: 85 db test %ebx,%ebx
110cb8: 0f 84 aa 00 00 00 je 110d68 <rtems_string_to_float+0xc4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110cbe: e8 45 2e 00 00 call 113b08 <__errno>
110cc3: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110cc9: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtof( s, &end );
110ccf: 83 ec 08 sub $0x8,%esp
110cd2: 8d 45 e4 lea -0x1c(%ebp),%eax
110cd5: 50 push %eax
110cd6: 56 push %esi
110cd7: e8 48 58 00 00 call 116524 <strtof>
if ( endptr )
110cdc: 83 c4 10 add $0x10,%esp
110cdf: 85 ff test %edi,%edi
110ce1: 0f 84 91 00 00 00 je 110d78 <rtems_string_to_float+0xd4>
*endptr = end;
110ce7: 8b 45 e4 mov -0x1c(%ebp),%eax
110cea: 89 07 mov %eax,(%edi)
if ( end == s )
110cec: 39 c6 cmp %eax,%esi
110cee: 74 68 je 110d58 <rtems_string_to_float+0xb4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110cf0: d9 5d c8 fstps -0x38(%ebp)
110cf3: e8 10 2e 00 00 call 113b08 <__errno>
110cf8: 83 38 22 cmpl $0x22,(%eax)
110cfb: d9 45 c8 flds -0x38(%ebp)
110cfe: 74 0c je 110d0c <rtems_string_to_float+0x68>
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
110d00: d9 1b fstps (%ebx)
return RTEMS_SUCCESSFUL;
110d02: 31 c0 xor %eax,%eax
}
110d04: 8d 65 f4 lea -0xc(%ebp),%esp
110d07: 5b pop %ebx
110d08: 5e pop %esi
110d09: 5f pop %edi
110d0a: c9 leave
110d0b: c3 ret
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110d0c: d9 ee fldz
110d0e: d9 c9 fxch %st(1)
110d10: dd e1 fucom %st(1)
110d12: df e0 fnstsw %ax
110d14: dd d9 fstp %st(1)
110d16: 80 e4 45 and $0x45,%ah
110d19: 80 fc 40 cmp $0x40,%ah
110d1c: 74 26 je 110d44 <rtems_string_to_float+0xa0><== NEVER TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
110d1e: d9 05 60 62 12 00 flds 0x126260
110d24: d9 c9 fxch %st(1)
110d26: dd e1 fucom %st(1)
110d28: df e0 fnstsw %ax
110d2a: dd d9 fstp %st(1)
110d2c: f6 c4 45 test $0x45,%ah
110d2f: 74 17 je 110d48 <rtems_string_to_float+0xa4><== ALWAYS TAKEN
110d31: d9 05 64 62 12 00 flds 0x126264 <== NOT EXECUTED
110d37: dd e9 fucomp %st(1) <== NOT EXECUTED
110d39: df e0 fnstsw %ax <== NOT EXECUTED
110d3b: f6 c4 45 test $0x45,%ah <== NOT EXECUTED
110d3e: 75 c0 jne 110d00 <rtems_string_to_float+0x5c><== NOT EXECUTED
110d40: dd d8 fstp %st(0) <== NOT EXECUTED
110d42: eb 06 jmp 110d4a <rtems_string_to_float+0xa6><== NOT EXECUTED
110d44: dd d8 fstp %st(0) <== NOT EXECUTED
110d46: eb 02 jmp 110d4a <rtems_string_to_float+0xa6><== NOT EXECUTED
110d48: dd d8 fstp %st(0)
return RTEMS_INVALID_NUMBER;
110d4a: b8 0a 00 00 00 mov $0xa,%eax
*n = result;
return RTEMS_SUCCESSFUL;
}
110d4f: 8d 65 f4 lea -0xc(%ebp),%esp
110d52: 5b pop %ebx
110d53: 5e pop %esi
110d54: 5f pop %edi
110d55: c9 leave
110d56: c3 ret
110d57: 90 nop
110d58: dd d8 fstp %st(0)
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
110d5a: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
110d5f: 8d 65 f4 lea -0xc(%ebp),%esp
110d62: 5b pop %ebx
110d63: 5e pop %esi
110d64: 5f pop %edi
110d65: c9 leave
110d66: c3 ret
110d67: 90 nop
{
float result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110d68: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
110d6d: 8d 65 f4 lea -0xc(%ebp),%esp
110d70: 5b pop %ebx
110d71: 5e pop %esi
110d72: 5f pop %edi
110d73: c9 leave
110d74: c3 ret
110d75: 8d 76 00 lea 0x0(%esi),%esi
errno = 0;
*n = 0;
result = strtof( s, &end );
if ( endptr )
110d78: 8b 45 e4 mov -0x1c(%ebp),%eax
110d7b: e9 6c ff ff ff jmp 110cec <rtems_string_to_float+0x48>
00110d80 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
110d80: 55 push %ebp
110d81: 89 e5 mov %esp,%ebp
110d83: 57 push %edi
110d84: 56 push %esi
110d85: 53 push %ebx
110d86: 83 ec 2c sub $0x2c,%esp
110d89: 8b 75 08 mov 0x8(%ebp),%esi
110d8c: 8b 5d 0c mov 0xc(%ebp),%ebx
110d8f: 8b 7d 10 mov 0x10(%ebp),%edi
long result;
char *end;
if ( !n )
110d92: 85 db test %ebx,%ebx
110d94: 0f 84 82 00 00 00 je 110e1c <rtems_string_to_int+0x9c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110d9a: e8 69 2d 00 00 call 113b08 <__errno>
110d9f: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110da5: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtol( s, &end, base );
110dab: 50 push %eax
110dac: ff 75 14 pushl 0x14(%ebp)
110daf: 8d 45 e4 lea -0x1c(%ebp),%eax
110db2: 50 push %eax
110db3: 56 push %esi
110db4: e8 2b 59 00 00 call 1166e4 <strtol>
110db9: 89 c2 mov %eax,%edx
if ( endptr )
110dbb: 83 c4 10 add $0x10,%esp
110dbe: 85 ff test %edi,%edi
110dc0: 74 6a je 110e2c <rtems_string_to_int+0xac>
*endptr = end;
110dc2: 8b 45 e4 mov -0x1c(%ebp),%eax
110dc5: 89 07 mov %eax,(%edi)
if ( end == s )
110dc7: 39 c6 cmp %eax,%esi
110dc9: 74 41 je 110e0c <rtems_string_to_int+0x8c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110dcb: 89 55 d4 mov %edx,-0x2c(%ebp)
110dce: e8 35 2d 00 00 call 113b08 <__errno>
110dd3: 83 38 22 cmpl $0x22,(%eax)
110dd6: 8b 55 d4 mov -0x2c(%ebp),%edx
110dd9: 74 0d je 110de8 <rtems_string_to_int+0x68>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
110ddb: 89 13 mov %edx,(%ebx)
return RTEMS_SUCCESSFUL;
110ddd: 31 c0 xor %eax,%eax
}
110ddf: 8d 65 f4 lea -0xc(%ebp),%esp
110de2: 5b pop %ebx
110de3: 5e pop %esi
110de4: 5f pop %edi
110de5: c9 leave
110de6: c3 ret
110de7: 90 nop
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110de8: 85 d2 test %edx,%edx
110dea: 74 10 je 110dfc <rtems_string_to_int+0x7c><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
110dec: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
110df2: 74 08 je 110dfc <rtems_string_to_int+0x7c><== ALWAYS TAKEN
110df4: 81 fa 00 00 00 80 cmp $0x80000000,%edx <== NOT EXECUTED
110dfa: 75 df jne 110ddb <rtems_string_to_int+0x5b><== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
110dfc: b8 0a 00 00 00 mov $0xa,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
110e01: 8d 65 f4 lea -0xc(%ebp),%esp
110e04: 5b pop %ebx
110e05: 5e pop %esi
110e06: 5f pop %edi
110e07: c9 leave
110e08: c3 ret
110e09: 8d 76 00 lea 0x0(%esi),%esi
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
110e0c: b8 0b 00 00 00 mov $0xb,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
110e11: 8d 65 f4 lea -0xc(%ebp),%esp
110e14: 5b pop %ebx
110e15: 5e pop %esi
110e16: 5f pop %edi
110e17: c9 leave
110e18: c3 ret
110e19: 8d 76 00 lea 0x0(%esi),%esi
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110e1c: b8 09 00 00 00 mov $0x9,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
110e21: 8d 65 f4 lea -0xc(%ebp),%esp
110e24: 5b pop %ebx
110e25: 5e pop %esi
110e26: 5f pop %edi
110e27: c9 leave
110e28: c3 ret
110e29: 8d 76 00 lea 0x0(%esi),%esi
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
110e2c: 8b 45 e4 mov -0x1c(%ebp),%eax
110e2f: eb 96 jmp 110dc7 <rtems_string_to_int+0x47>
00110f00 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
110f00: 55 push %ebp
110f01: 89 e5 mov %esp,%ebp
110f03: 57 push %edi
110f04: 56 push %esi
110f05: 53 push %ebx
110f06: 83 ec 2c sub $0x2c,%esp
110f09: 8b 75 08 mov 0x8(%ebp),%esi
110f0c: 8b 5d 0c mov 0xc(%ebp),%ebx
110f0f: 8b 7d 10 mov 0x10(%ebp),%edi
long result;
char *end;
if ( !n )
110f12: 85 db test %ebx,%ebx
110f14: 0f 84 82 00 00 00 je 110f9c <rtems_string_to_long+0x9c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110f1a: e8 e9 2b 00 00 call 113b08 <__errno>
110f1f: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110f25: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtol( s, &end, base );
110f2b: 50 push %eax
110f2c: ff 75 14 pushl 0x14(%ebp)
110f2f: 8d 45 e4 lea -0x1c(%ebp),%eax
110f32: 50 push %eax
110f33: 56 push %esi
110f34: e8 ab 57 00 00 call 1166e4 <strtol>
110f39: 89 c2 mov %eax,%edx
if ( endptr )
110f3b: 83 c4 10 add $0x10,%esp
110f3e: 85 ff test %edi,%edi
110f40: 74 6a je 110fac <rtems_string_to_long+0xac>
*endptr = end;
110f42: 8b 45 e4 mov -0x1c(%ebp),%eax
110f45: 89 07 mov %eax,(%edi)
if ( end == s )
110f47: 39 c6 cmp %eax,%esi
110f49: 74 41 je 110f8c <rtems_string_to_long+0x8c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110f4b: 89 55 d4 mov %edx,-0x2c(%ebp)
110f4e: e8 b5 2b 00 00 call 113b08 <__errno>
110f53: 83 38 22 cmpl $0x22,(%eax)
110f56: 8b 55 d4 mov -0x2c(%ebp),%edx
110f59: 74 0d je 110f68 <rtems_string_to_long+0x68>
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
110f5b: 89 13 mov %edx,(%ebx)
return RTEMS_SUCCESSFUL;
110f5d: 31 c0 xor %eax,%eax
}
110f5f: 8d 65 f4 lea -0xc(%ebp),%esp
110f62: 5b pop %ebx
110f63: 5e pop %esi
110f64: 5f pop %edi
110f65: c9 leave
110f66: c3 ret
110f67: 90 nop
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110f68: 85 d2 test %edx,%edx
110f6a: 74 10 je 110f7c <rtems_string_to_long+0x7c><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
110f6c: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx
110f72: 74 08 je 110f7c <rtems_string_to_long+0x7c>
110f74: 81 fa 00 00 00 80 cmp $0x80000000,%edx
110f7a: 75 df jne 110f5b <rtems_string_to_long+0x5b><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
110f7c: b8 0a 00 00 00 mov $0xa,%eax
*n = result;
return RTEMS_SUCCESSFUL;
}
110f81: 8d 65 f4 lea -0xc(%ebp),%esp
110f84: 5b pop %ebx
110f85: 5e pop %esi
110f86: 5f pop %edi
110f87: c9 leave
110f88: c3 ret
110f89: 8d 76 00 lea 0x0(%esi),%esi
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
110f8c: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
110f91: 8d 65 f4 lea -0xc(%ebp),%esp
110f94: 5b pop %ebx
110f95: 5e pop %esi
110f96: 5f pop %edi
110f97: c9 leave
110f98: c3 ret
110f99: 8d 76 00 lea 0x0(%esi),%esi
{
long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110f9c: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
110fa1: 8d 65 f4 lea -0xc(%ebp),%esp
110fa4: 5b pop %ebx
110fa5: 5e pop %esi
110fa6: 5f pop %edi
110fa7: c9 leave
110fa8: c3 ret
110fa9: 8d 76 00 lea 0x0(%esi),%esi
errno = 0;
*n = 0;
result = strtol( s, &end, base );
if ( endptr )
110fac: 8b 45 e4 mov -0x1c(%ebp),%eax
110faf: eb 96 jmp 110f47 <rtems_string_to_long+0x47>
00110e34 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
110e34: 55 push %ebp
110e35: 89 e5 mov %esp,%ebp
110e37: 57 push %edi
110e38: 56 push %esi
110e39: 53 push %ebx
110e3a: 83 ec 2c sub $0x2c,%esp
110e3d: 8b 5d 0c mov 0xc(%ebp),%ebx
110e40: 8b 7d 10 mov 0x10(%ebp),%edi
long long result;
char *end;
if ( !n )
110e43: 85 db test %ebx,%ebx
110e45: 0f 84 9d 00 00 00 je 110ee8 <rtems_string_to_long_long+0xb4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
110e4b: e8 b8 2c 00 00 call 113b08 <__errno>
110e50: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110e56: c7 03 00 00 00 00 movl $0x0,(%ebx)
110e5c: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtoll( s, &end, base );
110e63: 50 push %eax
110e64: ff 75 14 pushl 0x14(%ebp)
110e67: 8d 45 e4 lea -0x1c(%ebp),%eax
110e6a: 50 push %eax
110e6b: ff 75 08 pushl 0x8(%ebp)
110e6e: e8 8d 58 00 00 call 116700 <strtoll>
110e73: 89 c6 mov %eax,%esi
if ( endptr )
110e75: 83 c4 10 add $0x10,%esp
110e78: 85 ff test %edi,%edi
110e7a: 74 7c je 110ef8 <rtems_string_to_long_long+0xc4>
*endptr = end;
110e7c: 8b 45 e4 mov -0x1c(%ebp),%eax
110e7f: 89 07 mov %eax,(%edi)
if ( end == s )
110e81: 39 45 08 cmp %eax,0x8(%ebp)
110e84: 74 52 je 110ed8 <rtems_string_to_long_long+0xa4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110e86: 89 55 d4 mov %edx,-0x2c(%ebp)
110e89: e8 7a 2c 00 00 call 113b08 <__errno>
110e8e: 83 38 22 cmpl $0x22,(%eax)
110e91: 8b 55 d4 mov -0x2c(%ebp),%edx
110e94: 74 12 je 110ea8 <rtems_string_to_long_long+0x74>
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
110e96: 89 33 mov %esi,(%ebx)
110e98: 89 53 04 mov %edx,0x4(%ebx)
return RTEMS_SUCCESSFUL;
110e9b: 31 c0 xor %eax,%eax
}
110e9d: 8d 65 f4 lea -0xc(%ebp),%esp
110ea0: 5b pop %ebx
110ea1: 5e pop %esi
110ea2: 5f pop %edi
110ea3: c9 leave
110ea4: c3 ret
110ea5: 8d 76 00 lea 0x0(%esi),%esi
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
110ea8: 89 d0 mov %edx,%eax
110eaa: 09 f0 or %esi,%eax
110eac: 74 1a je 110ec8 <rtems_string_to_long_long+0x94><== NEVER TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
110eae: 89 d1 mov %edx,%ecx
110eb0: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx
110eb6: 89 f0 mov %esi,%eax
110eb8: f7 d0 not %eax
110eba: 09 c1 or %eax,%ecx
110ebc: 74 0a je 110ec8 <rtems_string_to_long_long+0x94>
110ebe: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax
110ec4: 09 f0 or %esi,%eax
110ec6: 75 ce jne 110e96 <rtems_string_to_long_long+0x62><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
110ec8: b8 0a 00 00 00 mov $0xa,%eax
*n = result;
return RTEMS_SUCCESSFUL;
}
110ecd: 8d 65 f4 lea -0xc(%ebp),%esp
110ed0: 5b pop %ebx
110ed1: 5e pop %esi
110ed2: 5f pop %edi
110ed3: c9 leave
110ed4: c3 ret
110ed5: 8d 76 00 lea 0x0(%esi),%esi
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
110ed8: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
110edd: 8d 65 f4 lea -0xc(%ebp),%esp
110ee0: 5b pop %ebx
110ee1: 5e pop %esi
110ee2: 5f pop %edi
110ee3: c9 leave
110ee4: c3 ret
110ee5: 8d 76 00 lea 0x0(%esi),%esi
{
long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
110ee8: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
110eed: 8d 65 f4 lea -0xc(%ebp),%esp
110ef0: 5b pop %ebx
110ef1: 5e pop %esi
110ef2: 5f pop %edi
110ef3: c9 leave
110ef4: c3 ret
110ef5: 8d 76 00 lea 0x0(%esi),%esi
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
if ( endptr )
110ef8: 8b 45 e4 mov -0x1c(%ebp),%eax
110efb: eb 84 jmp 110e81 <rtems_string_to_long_long+0x4d>
00110fcc <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
110fcc: 55 push %ebp
110fcd: 89 e5 mov %esp,%ebp
110fcf: 57 push %edi
110fd0: 56 push %esi
110fd1: 53 push %ebx
110fd2: 83 ec 2c sub $0x2c,%esp
110fd5: 8b 75 08 mov 0x8(%ebp),%esi
110fd8: 8b 5d 0c mov 0xc(%ebp),%ebx
110fdb: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long result;
char *end;
if ( !n )
110fde: 85 db test %ebx,%ebx
110fe0: 0f 84 92 00 00 00 je 111078 <rtems_string_to_unsigned_char+0xac><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
errno = 0;
110fe6: e8 1d 2b 00 00 call 113b08 <__errno>
110feb: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
110ff1: c6 03 00 movb $0x0,(%ebx)
result = strtoul( s, &end, base );
110ff4: 50 push %eax
110ff5: ff 75 14 pushl 0x14(%ebp)
110ff8: 8d 45 e4 lea -0x1c(%ebp),%eax
110ffb: 50 push %eax
110ffc: 56 push %esi
110ffd: e8 9e 5b 00 00 call 116ba0 <strtoul>
111002: 89 c2 mov %eax,%edx
if ( endptr )
111004: 83 c4 10 add $0x10,%esp
111007: 85 ff test %edi,%edi
111009: 74 7d je 111088 <rtems_string_to_unsigned_char+0xbc>
*endptr = end;
11100b: 8b 45 e4 mov -0x1c(%ebp),%eax
11100e: 89 07 mov %eax,(%edi)
if ( end == s )
111010: 39 c6 cmp %eax,%esi
111012: 74 54 je 111068 <rtems_string_to_unsigned_char+0x9c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111014: 89 55 d4 mov %edx,-0x2c(%ebp)
111017: e8 ec 2a 00 00 call 113b08 <__errno>
11101c: 83 38 22 cmpl $0x22,(%eax)
11101f: 8b 55 d4 mov -0x2c(%ebp),%edx
111022: 74 14 je 111038 <rtems_string_to_unsigned_char+0x6c><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
111024: 81 fa ff 00 00 00 cmp $0xff,%edx
11102a: 77 24 ja 111050 <rtems_string_to_unsigned_char+0x84><== NEVER TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
11102c: 88 13 mov %dl,(%ebx)
return RTEMS_SUCCESSFUL;
11102e: 31 c0 xor %eax,%eax
}
111030: 8d 65 f4 lea -0xc(%ebp),%esp
111033: 5b pop %ebx
111034: 5e pop %esi
111035: 5f pop %edi
111036: c9 leave
111037: c3 ret
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
111038: 8d 42 ff lea -0x1(%edx),%eax <== NOT EXECUTED
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
11103b: 83 f8 fd cmp $0xfffffffd,%eax <== NOT EXECUTED
11103e: 76 e4 jbe 111024 <rtems_string_to_unsigned_char+0x58><== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
111040: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
111045: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
111048: 5b pop %ebx <== NOT EXECUTED
111049: 5e pop %esi <== NOT EXECUTED
11104a: 5f pop %edi <== NOT EXECUTED
11104b: c9 leave <== NOT EXECUTED
11104c: c3 ret <== NOT EXECUTED
11104d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
111050: e8 b3 2a 00 00 call 113b08 <__errno> <== NOT EXECUTED
111055: c7 00 22 00 00 00 movl $0x22,(%eax) <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
11105b: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
111060: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
111063: 5b pop %ebx <== NOT EXECUTED
111064: 5e pop %esi <== NOT EXECUTED
111065: 5f pop %edi <== NOT EXECUTED
111066: c9 leave <== NOT EXECUTED
111067: c3 ret <== NOT EXECUTED
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
111068: b8 0b 00 00 00 mov $0xb,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
11106d: 8d 65 f4 lea -0xc(%ebp),%esp
111070: 5b pop %ebx
111071: 5e pop %esi
111072: 5f pop %edi
111073: c9 leave
111074: c3 ret
111075: 8d 76 00 lea 0x0(%esi),%esi
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
111078: b8 09 00 00 00 mov $0x9,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
11107d: 8d 65 f4 lea -0xc(%ebp),%esp
111080: 5b pop %ebx
111081: 5e pop %esi
111082: 5f pop %edi
111083: c9 leave
111084: c3 ret
111085: 8d 76 00 lea 0x0(%esi),%esi
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
111088: 8b 45 e4 mov -0x1c(%ebp),%eax
11108b: eb 83 jmp 111010 <rtems_string_to_unsigned_char+0x44>
00111090 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
111090: 55 push %ebp
111091: 89 e5 mov %esp,%ebp
111093: 57 push %edi
111094: 56 push %esi
111095: 53 push %ebx
111096: 83 ec 2c sub $0x2c,%esp
111099: 8b 75 08 mov 0x8(%ebp),%esi
11109c: 8b 5d 0c mov 0xc(%ebp),%ebx
11109f: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long result;
char *end;
if ( !n )
1110a2: 85 db test %ebx,%ebx
1110a4: 74 76 je 11111c <rtems_string_to_unsigned_int+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
1110a6: e8 5d 2a 00 00 call 113b08 <__errno>
1110ab: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
1110b1: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtoul( s, &end, base );
1110b7: 50 push %eax
1110b8: ff 75 14 pushl 0x14(%ebp)
1110bb: 8d 45 e4 lea -0x1c(%ebp),%eax
1110be: 50 push %eax
1110bf: 56 push %esi
1110c0: e8 db 5a 00 00 call 116ba0 <strtoul>
1110c5: 89 c2 mov %eax,%edx
if ( endptr )
1110c7: 83 c4 10 add $0x10,%esp
1110ca: 85 ff test %edi,%edi
1110cc: 74 5e je 11112c <rtems_string_to_unsigned_int+0x9c>
*endptr = end;
1110ce: 8b 45 e4 mov -0x1c(%ebp),%eax
1110d1: 89 07 mov %eax,(%edi)
if ( end == s )
1110d3: 39 c6 cmp %eax,%esi
1110d5: 74 35 je 11110c <rtems_string_to_unsigned_int+0x7c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1110d7: 89 55 d4 mov %edx,-0x2c(%ebp)
1110da: e8 29 2a 00 00 call 113b08 <__errno>
1110df: 83 38 22 cmpl $0x22,(%eax)
1110e2: 8b 55 d4 mov -0x2c(%ebp),%edx
1110e5: 74 0d je 1110f4 <rtems_string_to_unsigned_int+0x64>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
1110e7: 89 13 mov %edx,(%ebx)
return RTEMS_SUCCESSFUL;
1110e9: 31 c0 xor %eax,%eax
}
1110eb: 8d 65 f4 lea -0xc(%ebp),%esp
1110ee: 5b pop %ebx
1110ef: 5e pop %esi
1110f0: 5f pop %edi
1110f1: c9 leave
1110f2: c3 ret
1110f3: 90 nop
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
1110f4: 8d 42 ff lea -0x1(%edx),%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1110f7: 83 f8 fd cmp $0xfffffffd,%eax
1110fa: 76 eb jbe 1110e7 <rtems_string_to_unsigned_int+0x57><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
1110fc: b8 0a 00 00 00 mov $0xa,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
111101: 8d 65 f4 lea -0xc(%ebp),%esp
111104: 5b pop %ebx
111105: 5e pop %esi
111106: 5f pop %edi
111107: c9 leave
111108: c3 ret
111109: 8d 76 00 lea 0x0(%esi),%esi
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
11110c: b8 0b 00 00 00 mov $0xb,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
111111: 8d 65 f4 lea -0xc(%ebp),%esp
111114: 5b pop %ebx
111115: 5e pop %esi
111116: 5f pop %edi
111117: c9 leave
111118: c3 ret
111119: 8d 76 00 lea 0x0(%esi),%esi
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
11111c: b8 09 00 00 00 mov $0x9,%eax
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
111121: 8d 65 f4 lea -0xc(%ebp),%esp
111124: 5b pop %ebx
111125: 5e pop %esi
111126: 5f pop %edi
111127: c9 leave
111128: c3 ret
111129: 8d 76 00 lea 0x0(%esi),%esi
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
11112c: 8b 45 e4 mov -0x1c(%ebp),%eax
11112f: eb a2 jmp 1110d3 <rtems_string_to_unsigned_int+0x43>
001111fc <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
1111fc: 55 push %ebp
1111fd: 89 e5 mov %esp,%ebp
1111ff: 57 push %edi
111200: 56 push %esi
111201: 53 push %ebx
111202: 83 ec 2c sub $0x2c,%esp
111205: 8b 75 08 mov 0x8(%ebp),%esi
111208: 8b 5d 0c mov 0xc(%ebp),%ebx
11120b: 8b 7d 10 mov 0x10(%ebp),%edi
unsigned long result;
char *end;
if ( !n )
11120e: 85 db test %ebx,%ebx
111210: 74 76 je 111288 <rtems_string_to_unsigned_long+0x8c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
111212: e8 f1 28 00 00 call 113b08 <__errno>
111217: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
11121d: c7 03 00 00 00 00 movl $0x0,(%ebx)
result = strtoul( s, &end, base );
111223: 50 push %eax
111224: ff 75 14 pushl 0x14(%ebp)
111227: 8d 45 e4 lea -0x1c(%ebp),%eax
11122a: 50 push %eax
11122b: 56 push %esi
11122c: e8 6f 59 00 00 call 116ba0 <strtoul>
111231: 89 c2 mov %eax,%edx
if ( endptr )
111233: 83 c4 10 add $0x10,%esp
111236: 85 ff test %edi,%edi
111238: 74 5e je 111298 <rtems_string_to_unsigned_long+0x9c>
*endptr = end;
11123a: 8b 45 e4 mov -0x1c(%ebp),%eax
11123d: 89 07 mov %eax,(%edi)
if ( end == s )
11123f: 39 c6 cmp %eax,%esi
111241: 74 35 je 111278 <rtems_string_to_unsigned_long+0x7c>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111243: 89 55 d4 mov %edx,-0x2c(%ebp)
111246: e8 bd 28 00 00 call 113b08 <__errno>
11124b: 83 38 22 cmpl $0x22,(%eax)
11124e: 8b 55 d4 mov -0x2c(%ebp),%edx
111251: 74 0d je 111260 <rtems_string_to_unsigned_long+0x64>
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
111253: 89 13 mov %edx,(%ebx)
return RTEMS_SUCCESSFUL;
111255: 31 c0 xor %eax,%eax
}
111257: 8d 65 f4 lea -0xc(%ebp),%esp
11125a: 5b pop %ebx
11125b: 5e pop %esi
11125c: 5f pop %edi
11125d: c9 leave
11125e: c3 ret
11125f: 90 nop
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
111260: 8d 42 ff lea -0x1(%edx),%eax
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111263: 83 f8 fd cmp $0xfffffffd,%eax
111266: 76 eb jbe 111253 <rtems_string_to_unsigned_long+0x57><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
111268: b8 0a 00 00 00 mov $0xa,%eax
*n = result;
return RTEMS_SUCCESSFUL;
}
11126d: 8d 65 f4 lea -0xc(%ebp),%esp
111270: 5b pop %ebx
111271: 5e pop %esi
111272: 5f pop %edi
111273: c9 leave
111274: c3 ret
111275: 8d 76 00 lea 0x0(%esi),%esi
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
111278: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
11127d: 8d 65 f4 lea -0xc(%ebp),%esp
111280: 5b pop %ebx
111281: 5e pop %esi
111282: 5f pop %edi
111283: c9 leave
111284: c3 ret
111285: 8d 76 00 lea 0x0(%esi),%esi
{
unsigned long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
111288: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
11128d: 8d 65 f4 lea -0xc(%ebp),%esp
111290: 5b pop %ebx
111291: 5e pop %esi
111292: 5f pop %edi
111293: c9 leave
111294: c3 ret
111295: 8d 76 00 lea 0x0(%esi),%esi
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
if ( endptr )
111298: 8b 45 e4 mov -0x1c(%ebp),%eax
11129b: eb a2 jmp 11123f <rtems_string_to_unsigned_long+0x43>
00111134 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
111134: 55 push %ebp
111135: 89 e5 mov %esp,%ebp
111137: 57 push %edi
111138: 56 push %esi
111139: 53 push %ebx
11113a: 83 ec 2c sub $0x2c,%esp
11113d: 8b 7d 08 mov 0x8(%ebp),%edi
111140: 8b 5d 0c mov 0xc(%ebp),%ebx
111143: 8b 75 10 mov 0x10(%ebp),%esi
unsigned long long result;
char *end;
if ( !n )
111146: 85 db test %ebx,%ebx
111148: 0f 84 96 00 00 00 je 1111e4 <rtems_string_to_unsigned_long_long+0xb0>
return RTEMS_INVALID_ADDRESS;
errno = 0;
11114e: e8 b5 29 00 00 call 113b08 <__errno>
111153: c7 00 00 00 00 00 movl $0x0,(%eax)
*n = 0;
111159: c7 03 00 00 00 00 movl $0x0,(%ebx)
11115f: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx)
result = strtoull( s, &end, base );
111166: 50 push %eax
111167: ff 75 14 pushl 0x14(%ebp)
11116a: 8d 45 e4 lea -0x1c(%ebp),%eax
11116d: 50 push %eax
11116e: 57 push %edi
11116f: e8 48 5a 00 00 call 116bbc <strtoull>
111174: 89 d1 mov %edx,%ecx
111176: 89 c2 mov %eax,%edx
if ( endptr )
111178: 83 c4 10 add $0x10,%esp
11117b: 85 f6 test %esi,%esi
11117d: 74 75 je 1111f4 <rtems_string_to_unsigned_long_long+0xc0>
*endptr = end;
11117f: 8b 45 e4 mov -0x1c(%ebp),%eax
111182: 89 06 mov %eax,(%esi)
if ( end == s )
111184: 39 c7 cmp %eax,%edi
111186: 74 4c je 1111d4 <rtems_string_to_unsigned_long_long+0xa0>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
111188: 89 55 d4 mov %edx,-0x2c(%ebp)
11118b: 89 4d d0 mov %ecx,-0x30(%ebp)
11118e: e8 75 29 00 00 call 113b08 <__errno>
111193: 83 38 22 cmpl $0x22,(%eax)
111196: 8b 55 d4 mov -0x2c(%ebp),%edx
111199: 8b 4d d0 mov -0x30(%ebp),%ecx
11119c: 74 12 je 1111b0 <rtems_string_to_unsigned_long_long+0x7c>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
11119e: 89 13 mov %edx,(%ebx)
1111a0: 89 4b 04 mov %ecx,0x4(%ebx)
return RTEMS_SUCCESSFUL;
1111a3: 31 c0 xor %eax,%eax
}
1111a5: 8d 65 f4 lea -0xc(%ebp),%esp
1111a8: 5b pop %ebx
1111a9: 5e pop %esi
1111aa: 5f pop %edi
1111ab: c9 leave
1111ac: c3 ret
1111ad: 8d 76 00 lea 0x0(%esi),%esi
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
1111b0: 89 d6 mov %edx,%esi
1111b2: 89 cf mov %ecx,%edi
1111b4: 83 c6 ff add $0xffffffff,%esi
1111b7: 83 d7 ff adc $0xffffffff,%edi
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1111ba: 83 ff ff cmp $0xffffffff,%edi
1111bd: 72 df jb 11119e <rtems_string_to_unsigned_long_long+0x6a><== NEVER TAKEN
1111bf: 83 fe fd cmp $0xfffffffd,%esi
1111c2: 76 da jbe 11119e <rtems_string_to_unsigned_long_long+0x6a><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
1111c4: b8 0a 00 00 00 mov $0xa,%eax
*n = result;
return RTEMS_SUCCESSFUL;
}
1111c9: 8d 65 f4 lea -0xc(%ebp),%esp
1111cc: 5b pop %ebx
1111cd: 5e pop %esi
1111ce: 5f pop %edi
1111cf: c9 leave
1111d0: c3 ret
1111d1: 8d 76 00 lea 0x0(%esi),%esi
if ( endptr )
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
1111d4: b8 0b 00 00 00 mov $0xb,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
1111d9: 8d 65 f4 lea -0xc(%ebp),%esp
1111dc: 5b pop %ebx
1111dd: 5e pop %esi
1111de: 5f pop %edi
1111df: c9 leave
1111e0: c3 ret
1111e1: 8d 76 00 lea 0x0(%esi),%esi
{
unsigned long long result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
1111e4: b8 09 00 00 00 mov $0x9,%eax
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
1111e9: 8d 65 f4 lea -0xc(%ebp),%esp
1111ec: 5b pop %ebx
1111ed: 5e pop %esi
1111ee: 5f pop %edi
1111ef: c9 leave
1111f0: c3 ret
1111f1: 8d 76 00 lea 0x0(%esi),%esi
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
if ( endptr )
1111f4: 8b 45 e4 mov -0x1c(%ebp),%eax
1111f7: eb 8b jmp 111184 <rtems_string_to_unsigned_long_long+0x50>
00107e44 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
107e44: 55 push %ebp
107e45: 89 e5 mov %esp,%ebp
107e47: 57 push %edi
107e48: 56 push %esi
107e49: 53 push %ebx
107e4a: 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(
107e50: 31 c0 xor %eax,%eax
107e52: b9 ff ff ff ff mov $0xffffffff,%ecx
107e57: 8b 7d 08 mov 0x8(%ebp),%edi
107e5a: f2 ae repnz scas %es:(%edi),%al
107e5c: f7 d1 not %ecx
107e5e: 49 dec %ecx
107e5f: 6a 00 push $0x0
107e61: 8d 45 d0 lea -0x30(%ebp),%eax
107e64: 89 85 2c fe ff ff mov %eax,-0x1d4(%ebp)
107e6a: 50 push %eax
107e6b: 6a 00 push $0x0
107e6d: 51 push %ecx
107e6e: ff 75 08 pushl 0x8(%ebp)
107e71: e8 9a 0a 00 00 call 108910 <rtems_filesystem_evaluate_path>
107e76: 89 85 44 fe ff ff mov %eax,-0x1bc(%ebp)
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
107e7c: 83 c4 20 add $0x20,%esp
107e7f: 85 c0 test %eax,%eax
107e81: 0f 85 61 01 00 00 jne 107fe8 <rtems_tarfs_load+0x1a4>
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
107e87: 8b 45 dc mov -0x24(%ebp),%eax
107e8a: 3d 20 6e 12 00 cmp $0x126e20,%eax
107e8f: 0f 85 47 01 00 00 jne 107fdc <rtems_tarfs_load+0x198>
107e95: 31 db xor %ebx,%ebx
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
107e97: 8d 45 bc lea -0x44(%ebp),%eax
107e9a: 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);
107ea0: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx
107ea6: 89 95 34 fe ff ff mov %edx,-0x1cc(%ebp)
107eac: eb 15 jmp 107ec3 <rtems_tarfs_load+0x7f>
107eae: 66 90 xchg %ax,%ax
* 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) {
107eb0: 80 bd 53 fe ff ff 30 cmpb $0x30,-0x1ad(%ebp)
107eb7: 0f 84 43 01 00 00 je 108000 <rtems_tarfs_load+0x1bc><== NEVER TAKEN
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
107ebd: 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)
107ec3: 8d 83 00 02 00 00 lea 0x200(%ebx),%eax
107ec9: 89 85 54 fe ff ff mov %eax,-0x1ac(%ebp)
107ecf: 8b 55 10 mov 0x10(%ebp),%edx
107ed2: 39 d0 cmp %edx,%eax
107ed4: 0f 87 18 01 00 00 ja 107ff2 <rtems_tarfs_load+0x1ae><== NEVER TAKEN
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
107eda: 03 5d 0c add 0xc(%ebp),%ebx
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar", 5))
107edd: 8d b3 01 01 00 00 lea 0x101(%ebx),%esi
107ee3: bf 68 6e 12 00 mov $0x126e68,%edi
107ee8: b9 05 00 00 00 mov $0x5,%ecx
107eed: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi)
107eef: 0f 85 fd 00 00 00 jne 107ff2 <rtems_tarfs_load+0x1ae>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
107ef5: 57 push %edi
107ef6: 6a 63 push $0x63
107ef8: 53 push %ebx
107ef9: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax
107eff: 50 push %eax
107f00: e8 f7 fd 00 00 call 117cfc <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
107f05: c6 45 bb 00 movb $0x0,-0x45(%ebp)
linkflag = hdr_ptr[156];
107f09: 8a 93 9c 00 00 00 mov 0x9c(%ebx),%dl
107f0f: 88 95 53 fe ff ff mov %dl,-0x1ad(%ebp)
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
107f15: 59 pop %ecx
107f16: 5e pop %esi
107f17: 6a 08 push $0x8
107f19: 8d 43 64 lea 0x64(%ebx),%eax
107f1c: 50 push %eax
107f1d: e8 ce 7c 00 00 call 10fbf0 <_rtems_octal2ulong>
107f22: 89 85 48 fe ff ff mov %eax,-0x1b8(%ebp)
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
107f28: 58 pop %eax
107f29: 5a pop %edx
107f2a: 6a 0c push $0xc
107f2c: 8d 43 7c lea 0x7c(%ebx),%eax
107f2f: 50 push %eax
107f30: e8 bb 7c 00 00 call 10fbf0 <_rtems_octal2ulong>
107f35: 89 85 4c fe ff ff mov %eax,-0x1b4(%ebp)
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
107f3b: 5e pop %esi
107f3c: 5f pop %edi
107f3d: 6a 08 push $0x8
107f3f: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax
107f45: 50 push %eax
107f46: e8 a5 7c 00 00 call 10fbf0 <_rtems_octal2ulong>
107f4b: 89 c6 mov %eax,%esi
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
107f4d: 89 1c 24 mov %ebx,(%esp)
107f50: e8 6f 81 00 00 call 1100c4 <_rtems_tar_header_checksum>
107f55: 83 c4 10 add $0x10,%esp
107f58: 39 f0 cmp %esi,%eax
107f5a: 0f 85 92 00 00 00 jne 107ff2 <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) {
107f60: 80 bd 53 fe ff ff 35 cmpb $0x35,-0x1ad(%ebp)
107f67: 0f 85 43 ff ff ff jne 107eb0 <rtems_tarfs_load+0x6c>
strcpy(full_filename, mountpoint);
107f6d: 83 ec 08 sub $0x8,%esp
107f70: ff 75 08 pushl 0x8(%ebp)
107f73: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax
107f79: 50 push %eax
107f7a: e8 15 fa 00 00 call 117994 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
107f7f: 31 c0 xor %eax,%eax
107f81: b9 ff ff ff ff mov $0xffffffff,%ecx
107f86: 8b bd 34 fe ff ff mov -0x1cc(%ebp),%edi
107f8c: f2 ae repnz scas %es:(%edi),%al
107f8e: f7 d1 not %ecx
107f90: 49 dec %ecx
107f91: 83 c4 10 add $0x10,%esp
107f94: 80 bc 0d 57 fe ff ff cmpb $0x2f,-0x1a9(%ebp,%ecx,1)
107f9b: 2f
107f9c: 74 0a je 107fa8 <rtems_tarfs_load+0x164><== ALWAYS TAKEN
strcat(full_filename, "/");
107f9e: 66 c7 84 0d 58 fe ff movw $0x2f,-0x1a8(%ebp,%ecx,1) <== NOT EXECUTED
107fa5: ff 2f 00
strcat(full_filename, filename);
107fa8: 83 ec 08 sub $0x8,%esp
107fab: 8d 95 58 ff ff ff lea -0xa8(%ebp),%edx
107fb1: 52 push %edx
107fb2: 8d 85 58 fe ff ff lea -0x1a8(%ebp),%eax
107fb8: 50 push %eax
107fb9: e8 22 f8 00 00 call 1177e0 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
107fbe: 5a pop %edx
107fbf: 59 pop %ecx
107fc0: 68 ff 01 00 00 push $0x1ff
107fc5: 8d 95 58 fe ff ff lea -0x1a8(%ebp),%edx
107fcb: 52 push %edx
107fcc: e8 fb 10 00 00 call 1090cc <mkdir>
107fd1: 83 c4 10 add $0x10,%esp
107fd4: e9 e4 fe ff ff jmp 107ebd <rtems_tarfs_load+0x79>
107fd9: 8d 76 00 lea 0x0(%esi),%esi
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops)
107fdc: 3d a0 78 12 00 cmp $0x1278a0,%eax
107fe1: 0f 84 ae fe ff ff je 107e95 <rtems_tarfs_load+0x51> <== NEVER TAKEN
107fe7: 90 nop
return -1;
107fe8: c7 85 44 fe ff ff ff movl $0xffffffff,-0x1bc(%ebp)
107fef: ff ff ff
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
107ff2: 8b 85 44 fe ff ff mov -0x1bc(%ebp),%eax
107ff8: 8d 65 f4 lea -0xc(%ebp),%esp
107ffb: 5b pop %ebx
107ffc: 5e pop %esi
107ffd: 5f pop %edi
107ffe: c9 leave
107fff: c3 ret
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
108000: 8b bd 30 fe ff ff mov -0x1d0(%ebp),%edi
108006: 8b b5 2c fe ff ff mov -0x1d4(%ebp),%esi
10800c: b9 05 00 00 00 mov $0x5,%ecx
108011: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
108013: 50 push %eax
108014: 8d 45 e4 lea -0x1c(%ebp),%eax
108017: 50 push %eax
108018: 8d 55 bc lea -0x44(%ebp),%edx
10801b: 52 push %edx
10801c: 8d 85 58 ff ff ff lea -0xa8(%ebp),%eax
108022: 50 push %eax
108023: e8 7c 88 00 00 call 1108a4 <IMFS_evaluate_for_make>
108028: 83 c4 10 add $0x10,%esp
10802b: 85 c0 test %eax,%eax
10802d: 74 1d je 10804c <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;
10802f: 8b 85 4c fe ff ff mov -0x1b4(%ebp),%eax
108035: 05 ff 01 00 00 add $0x1ff,%eax
offset += 512 * nblocks;
10803a: 25 00 fe ff ff and $0xfffffe00,%eax
10803f: 01 85 54 fe ff ff add %eax,-0x1ac(%ebp)
108045: e9 73 fe ff ff jmp 107ebd <rtems_tarfs_load+0x79>
10804a: 66 90 xchg %ax,%ax
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
10804c: 83 ec 0c sub $0xc,%esp
10804f: 6a 00 push $0x0
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
108051: 8b 85 48 fe ff ff mov -0x1b8(%ebp),%eax
108057: 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(
10805c: 80 cc 80 or $0x80,%ah
10805f: 50 push %eax
108060: ff 75 e4 pushl -0x1c(%ebp)
108063: 6a 06 push $0x6
108065: 8d 55 bc lea -0x44(%ebp),%edx
108068: 52 push %edx
108069: e8 3e 82 00 00 call 1102ac <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;
10806e: 8b 95 4c fe ff ff mov -0x1b4(%ebp),%edx
108074: 89 50 50 mov %edx,0x50(%eax)
108077: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
node->info.linearfile.direct = &tar_image[offset];
10807e: 8b 55 0c mov 0xc(%ebp),%edx
108081: 03 95 54 fe ff ff add -0x1ac(%ebp),%edx
108087: 89 50 58 mov %edx,0x58(%eax)
10808a: 83 c4 20 add $0x20,%esp
10808d: eb a0 jmp 10802f <rtems_tarfs_load+0x1eb>
0010b894 <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
rtems_id *id
)
{
10b894: 55 push %ebp
10b895: 89 e5 mov %esp,%ebp
10b897: 57 push %edi
10b898: 56 push %esi
10b899: 53 push %ebx
10b89a: 83 ec 1c sub $0x1c,%esp
10b89d: 8b 5d 08 mov 0x8(%ebp),%ebx
10b8a0: 8b 7d 0c mov 0xc(%ebp),%edi
10b8a3: 8b 75 1c mov 0x1c(%ebp),%esi
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
10b8a6: 85 f6 test %esi,%esi
10b8a8: 0f 84 3e 01 00 00 je 10b9ec <rtems_task_create+0x158>
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
10b8ae: 85 db test %ebx,%ebx
10b8b0: 0f 84 d2 00 00 00 je 10b988 <rtems_task_create+0xf4>
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
10b8b6: f7 45 18 00 80 00 00 testl $0x8000,0x18(%ebp)
10b8bd: 75 17 jne 10b8d6 <rtems_task_create+0x42>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10b8bf: 85 ff test %edi,%edi
10b8c1: 0f 84 b1 00 00 00 je 10b978 <rtems_task_create+0xe4>
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
10b8c7: 0f b6 05 34 3b 12 00 movzbl 0x123b34,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10b8ce: 39 c7 cmp %eax,%edi
10b8d0: 0f 87 a2 00 00 00 ja 10b978 <rtems_task_create+0xe4>
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
10b8d6: 83 ec 0c sub $0xc,%esp
10b8d9: ff 35 00 7f 12 00 pushl 0x127f00
10b8df: e8 c4 06 00 00 call 10bfa8 <_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 );
10b8e4: c7 04 24 e0 7d 12 00 movl $0x127de0,(%esp)
10b8eb: e8 dc 10 00 00 call 10c9cc <_Objects_Allocate>
10b8f0: 89 c2 mov %eax,%edx
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
10b8f2: 83 c4 10 add $0x10,%esp
10b8f5: 85 c0 test %eax,%eax
10b8f7: 0f 84 cf 00 00 00 je 10b9cc <rtems_task_create+0x138>
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
10b8fd: 50 push %eax
10b8fe: 53 push %ebx
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
10b8ff: 8b 45 14 mov 0x14(%ebp),%eax
10b902: 83 e0 01 and $0x1,%eax
10b905: 50 push %eax
10b906: 6a 00 push $0x0
10b908: 31 c0 xor %eax,%eax
10b90a: f7 45 14 00 02 00 00 testl $0x200,0x14(%ebp)
10b911: 0f 95 c0 setne %al
10b914: 50 push %eax
10b915: 31 c0 xor %eax,%eax
10b917: f7 45 14 00 01 00 00 testl $0x100,0x14(%ebp)
10b91e: 0f 94 c0 sete %al
10b921: 50 push %eax
10b922: 57 push %edi
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_floating_point(
rtems_attribute attribute_set
)
{
return ( attribute_set & RTEMS_FLOATING_POINT ) ? true : false;
10b923: 8b 45 18 mov 0x18(%ebp),%eax
10b926: 83 e0 01 and $0x1,%eax
10b929: 50 push %eax
10b92a: ff 75 10 pushl 0x10(%ebp)
10b92d: 6a 00 push $0x0
10b92f: 52 push %edx
10b930: 68 e0 7d 12 00 push $0x127de0
10b935: 89 55 e4 mov %edx,-0x1c(%ebp)
10b938: e8 67 21 00 00 call 10daa4 <_Thread_Initialize>
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
10b93d: 83 c4 30 add $0x30,%esp
10b940: 84 c0 test %al,%al
10b942: 8b 55 e4 mov -0x1c(%ebp),%edx
10b945: 74 51 je 10b998 <rtems_task_create+0x104>
_RTEMS_Unlock_allocator();
return RTEMS_UNSATISFIED;
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
10b947: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax
* id - thread id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_task_create(
10b94d: 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;
10b954: 0f 94 40 08 sete 0x8(%eax)
*id = the_thread->Object.id;
10b958: 8b 42 08 mov 0x8(%edx),%eax
10b95b: 89 06 mov %eax,(%esi)
);
}
#endif
_RTEMS_Unlock_allocator();
10b95d: 83 ec 0c sub $0xc,%esp
10b960: ff 35 00 7f 12 00 pushl 0x127f00
10b966: e8 85 06 00 00 call 10bff0 <_API_Mutex_Unlock>
return RTEMS_SUCCESSFUL;
10b96b: 83 c4 10 add $0x10,%esp
10b96e: 31 c0 xor %eax,%eax
}
10b970: 8d 65 f4 lea -0xc(%ebp),%esp
10b973: 5b pop %ebx
10b974: 5e pop %esi
10b975: 5f pop %edi
10b976: c9 leave
10b977: 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;
10b978: b8 13 00 00 00 mov $0x13,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b97d: 8d 65 f4 lea -0xc(%ebp),%esp
10b980: 5b pop %ebx
10b981: 5e pop %esi
10b982: 5f pop %edi
10b983: c9 leave
10b984: c3 ret
10b985: 8d 76 00 lea 0x0(%esi),%esi
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10b988: b8 03 00 00 00 mov $0x3,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b98d: 8d 65 f4 lea -0xc(%ebp),%esp
10b990: 5b pop %ebx
10b991: 5e pop %esi
10b992: 5f pop %edi
10b993: c9 leave
10b994: c3 ret
10b995: 8d 76 00 lea 0x0(%esi),%esi
*/
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
_Objects_Free(
10b998: 83 ec 0c sub $0xc,%esp
10b99b: ff 72 08 pushl 0x8(%edx)
10b99e: e8 0d 14 00 00 call 10cdb0 <_Objects_Get_information_id>
10b9a3: 5a pop %edx
10b9a4: 59 pop %ecx
10b9a5: 8b 55 e4 mov -0x1c(%ebp),%edx
10b9a8: 52 push %edx
10b9a9: 50 push %eax
10b9aa: e8 91 13 00 00 call 10cd40 <_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();
10b9af: 58 pop %eax
10b9b0: ff 35 00 7f 12 00 pushl 0x127f00
10b9b6: e8 35 06 00 00 call 10bff0 <_API_Mutex_Unlock>
return RTEMS_UNSATISFIED;
10b9bb: 83 c4 10 add $0x10,%esp
10b9be: b8 0d 00 00 00 mov $0xd,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b9c3: 8d 65 f4 lea -0xc(%ebp),%esp
10b9c6: 5b pop %ebx
10b9c7: 5e pop %esi
10b9c8: 5f pop %edi
10b9c9: c9 leave
10b9ca: c3 ret
10b9cb: 90 nop
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
10b9cc: 83 ec 0c sub $0xc,%esp
10b9cf: ff 35 00 7f 12 00 pushl 0x127f00
10b9d5: e8 16 06 00 00 call 10bff0 <_API_Mutex_Unlock>
return RTEMS_TOO_MANY;
10b9da: 83 c4 10 add $0x10,%esp
10b9dd: b8 05 00 00 00 mov $0x5,%eax
}
#endif
_RTEMS_Unlock_allocator();
return RTEMS_SUCCESSFUL;
}
10b9e2: 8d 65 f4 lea -0xc(%ebp),%esp
10b9e5: 5b pop %ebx
10b9e6: 5e pop %esi
10b9e7: 5f pop %edi
10b9e8: c9 leave
10b9e9: c3 ret
10b9ea: 66 90 xchg %ax,%ax
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10b9ec: b8 09 00 00 00 mov $0x9,%eax
10b9f1: eb 8a jmp 10b97d <rtems_task_create+0xe9>
0010b9f4 <rtems_task_delete>:
*/
rtems_status_code rtems_task_delete(
rtems_id id
)
{
10b9f4: 55 push %ebp
10b9f5: 89 e5 mov %esp,%ebp
10b9f7: 53 push %ebx
10b9f8: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
Objects_Information *the_information;
_RTEMS_Lock_allocator();
10b9fb: ff 35 00 7f 12 00 pushl 0x127f00
10ba01: e8 a2 05 00 00 call 10bfa8 <_API_Mutex_Lock>
the_thread = _Thread_Get( id, &location );
10ba06: 5a pop %edx
10ba07: 59 pop %ecx
10ba08: 8d 45 f4 lea -0xc(%ebp),%eax
10ba0b: 50 push %eax
10ba0c: ff 75 08 pushl 0x8(%ebp)
10ba0f: e8 18 20 00 00 call 10da2c <_Thread_Get>
10ba14: 89 c3 mov %eax,%ebx
switch ( location ) {
10ba16: 83 c4 10 add $0x10,%esp
10ba19: 8b 45 f4 mov -0xc(%ebp),%eax
10ba1c: 85 c0 test %eax,%eax
10ba1e: 75 44 jne 10ba64 <rtems_task_delete+0x70><== NEVER TAKEN
case OBJECTS_LOCAL:
the_information = _Objects_Get_information_id( the_thread->Object.id );
10ba20: 83 ec 0c sub $0xc,%esp
10ba23: ff 73 08 pushl 0x8(%ebx)
10ba26: e8 85 13 00 00 call 10cdb0 <_Objects_Get_information_id>
0 /* Not used */
);
}
#endif
_Thread_Close( the_information, the_thread );
10ba2b: 5a pop %edx
10ba2c: 59 pop %ecx
10ba2d: 53 push %ebx
10ba2e: 50 push %eax
10ba2f: e8 ac 1c 00 00 call 10d6e0 <_Thread_Close>
10ba34: 58 pop %eax
10ba35: ff 73 08 pushl 0x8(%ebx)
10ba38: e8 73 13 00 00 call 10cdb0 <_Objects_Get_information_id>
10ba3d: 5a pop %edx
10ba3e: 59 pop %ecx
10ba3f: 53 push %ebx
10ba40: 50 push %eax
10ba41: e8 fa 12 00 00 call 10cd40 <_Objects_Free>
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
10ba46: 58 pop %eax
10ba47: ff 35 00 7f 12 00 pushl 0x127f00
10ba4d: e8 9e 05 00 00 call 10bff0 <_API_Mutex_Unlock>
_Thread_Enable_dispatch();
10ba52: e8 b1 1f 00 00 call 10da08 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ba57: 83 c4 10 add $0x10,%esp
10ba5a: 31 c0 xor %eax,%eax
break;
}
_RTEMS_Unlock_allocator();
return RTEMS_INVALID_ID;
}
10ba5c: 8b 5d fc mov -0x4(%ebp),%ebx
10ba5f: c9 leave
10ba60: c3 ret
10ba61: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
_RTEMS_Unlock_allocator();
10ba64: 83 ec 0c sub $0xc,%esp
10ba67: ff 35 00 7f 12 00 pushl 0x127f00
10ba6d: e8 7e 05 00 00 call 10bff0 <_API_Mutex_Unlock>
return RTEMS_INVALID_ID;
10ba72: 83 c4 10 add $0x10,%esp
10ba75: b8 04 00 00 00 mov $0x4,%eax
}
10ba7a: 8b 5d fc mov -0x4(%ebp),%ebx
10ba7d: c9 leave
10ba7e: c3 ret
0010d52c <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
10d52c: 55 push %ebp
10d52d: 89 e5 mov %esp,%ebp
10d52f: 56 push %esi
10d530: 53 push %ebx
10d531: 83 ec 10 sub $0x10,%esp
10d534: 8b 45 08 mov 0x8(%ebp),%eax
10d537: 8b 75 0c mov 0xc(%ebp),%esi
10d53a: 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() )
10d53d: 80 3d a4 79 12 00 00 cmpb $0x0,0x1279a4
10d544: 74 6e je 10d5b4 <rtems_task_get_note+0x88>
return RTEMS_NOT_CONFIGURED;
if ( !note )
10d546: 85 db test %ebx,%ebx
10d548: 74 7e je 10d5c8 <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 )
10d54a: 83 fe 0f cmp $0xf,%esi
10d54d: 77 3d ja 10d58c <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 ) ||
10d54f: 85 c0 test %eax,%eax
10d551: 74 45 je 10d598 <rtems_task_get_note+0x6c>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
10d553: 8b 15 d8 c5 12 00 mov 0x12c5d8,%edx
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d559: 3b 42 08 cmp 0x8(%edx),%eax
10d55c: 74 40 je 10d59e <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 );
10d55e: 83 ec 08 sub $0x8,%esp
10d561: 8d 55 f4 lea -0xc(%ebp),%edx
10d564: 52 push %edx
10d565: 50 push %eax
10d566: e8 09 23 00 00 call 10f874 <_Thread_Get>
switch ( location ) {
10d56b: 83 c4 10 add $0x10,%esp
10d56e: 8b 55 f4 mov -0xc(%ebp),%edx
10d571: 85 d2 test %edx,%edx
10d573: 75 4b jne 10d5c0 <rtems_task_get_note+0x94>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10d575: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
10d57b: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10d57f: 89 03 mov %eax,(%ebx)
_Thread_Enable_dispatch();
10d581: e8 ca 22 00 00 call 10f850 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d586: 31 c0 xor %eax,%eax
10d588: eb 07 jmp 10d591 <rtems_task_get_note+0x65>
10d58a: 66 90 xchg %ax,%ax
* 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;
10d58c: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d591: 8d 65 f8 lea -0x8(%ebp),%esp
10d594: 5b pop %ebx
10d595: 5e pop %esi
10d596: c9 leave
10d597: c3 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d598: 8b 15 d8 c5 12 00 mov 0x12c5d8,%edx
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
10d59e: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax
10d5a4: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax
10d5a8: 89 03 mov %eax,(%ebx)
return RTEMS_SUCCESSFUL;
10d5aa: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d5ac: 8d 65 f8 lea -0x8(%ebp),%esp
10d5af: 5b pop %ebx
10d5b0: 5e pop %esi
10d5b1: c9 leave
10d5b2: c3 ret
10d5b3: 90 nop
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
10d5b4: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d5b9: 8d 65 f8 lea -0x8(%ebp),%esp
10d5bc: 5b pop %ebx
10d5bd: 5e pop %esi
10d5be: c9 leave
10d5bf: c3 ret
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d5c0: b8 04 00 00 00 mov $0x4,%eax
10d5c5: eb ca jmp 10d591 <rtems_task_get_note+0x65>
10d5c7: 90 nop
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
return RTEMS_INVALID_ADDRESS;
10d5c8: b8 09 00 00 00 mov $0x9,%eax
10d5cd: eb c2 jmp 10d591 <rtems_task_get_note+0x65>
0011818c <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
rtems_id id
)
{
11818c: 55 push %ebp
11818d: 89 e5 mov %esp,%ebp
11818f: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
118192: 8d 45 f4 lea -0xc(%ebp),%eax
118195: 50 push %eax
118196: ff 75 08 pushl 0x8(%ebp)
118199: e8 46 3d 00 00 call 11bee4 <_Thread_Get>
switch ( location ) {
11819e: 83 c4 10 add $0x10,%esp
1181a1: 8b 55 f4 mov -0xc(%ebp),%edx
1181a4: 85 d2 test %edx,%edx
1181a6: 74 08 je 1181b0 <rtems_task_is_suspended+0x24>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
1181a8: b8 04 00 00 00 mov $0x4,%eax
}
1181ad: c9 leave
1181ae: c3 ret
1181af: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
1181b0: f6 40 10 02 testb $0x2,0x10(%eax)
1181b4: 74 0e je 1181c4 <rtems_task_is_suspended+0x38>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
1181b6: e8 05 3d 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_ALREADY_SUSPENDED;
1181bb: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1181c0: c9 leave
1181c1: c3 ret
1181c2: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Enable_dispatch();
1181c4: e8 f7 3c 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
1181c9: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1181cb: c9 leave
1181cc: c3 ret
00112e64 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
112e64: 55 push %ebp
112e65: 89 e5 mov %esp,%ebp
112e67: 57 push %edi
112e68: 56 push %esi
112e69: 53 push %ebx
112e6a: 83 ec 1c sub $0x1c,%esp
112e6d: 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 )
112e70: 85 c9 test %ecx,%ecx
112e72: 0f 84 40 01 00 00 je 112fb8 <rtems_task_mode+0x154>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
112e78: 8b 1d f8 83 12 00 mov 0x1283f8,%ebx
api = executing->API_Extensions[ THREAD_API_RTEMS ];
112e7e: 8b bb e8 00 00 00 mov 0xe8(%ebx),%edi
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
112e84: 80 7b 74 01 cmpb $0x1,0x74(%ebx)
112e88: 19 f6 sbb %esi,%esi
112e8a: 81 e6 00 01 00 00 and $0x100,%esi
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
112e90: 8b 53 7c mov 0x7c(%ebx),%edx
112e93: 85 d2 test %edx,%edx
112e95: 0f 85 f1 00 00 00 jne 112f8c <rtems_task_mode+0x128>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
112e9b: 80 7f 08 01 cmpb $0x1,0x8(%edi)
112e9f: 19 d2 sbb %edx,%edx
112ea1: 81 e2 00 04 00 00 and $0x400,%edx
old_mode |= _ISR_Get_level();
112ea7: 89 55 e4 mov %edx,-0x1c(%ebp)
112eaa: 89 4d e0 mov %ecx,-0x20(%ebp)
112ead: e8 3a bf ff ff call 10edec <_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;
112eb2: 8b 55 e4 mov -0x1c(%ebp),%edx
112eb5: 09 d0 or %edx,%eax
old_mode |= _ISR_Get_level();
112eb7: 09 f0 or %esi,%eax
112eb9: 8b 4d e0 mov -0x20(%ebp),%ecx
112ebc: 89 01 mov %eax,(%ecx)
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
112ebe: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp)
112ec5: 74 0b je 112ed2 <rtems_task_mode+0x6e>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
112ec7: f7 45 08 00 01 00 00 testl $0x100,0x8(%ebp)
112ece: 0f 94 43 74 sete 0x74(%ebx)
if ( mask & RTEMS_TIMESLICE_MASK ) {
112ed2: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp)
112ed9: 74 1c je 112ef7 <rtems_task_mode+0x93>
if ( _Modes_Is_timeslice(mode_set) ) {
112edb: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp)
112ee2: 0f 84 b8 00 00 00 je 112fa0 <rtems_task_mode+0x13c>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
112ee8: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
112eef: a1 20 7e 12 00 mov 0x127e20,%eax
112ef4: 89 43 78 mov %eax,0x78(%ebx)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
112ef7: f6 45 0c 01 testb $0x1,0xc(%ebp)
112efb: 74 0b je 112f08 <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 ) );
112efd: f6 45 08 01 testb $0x1,0x8(%ebp)
112f01: 0f 84 91 00 00 00 je 112f98 <rtems_task_mode+0x134>
112f07: fa cli
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
112f08: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp)
112f0f: 74 3f je 112f50 <rtems_task_mode+0xec>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
112f11: f7 45 08 00 04 00 00 testl $0x400,0x8(%ebp)
112f18: 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 ) {
112f1b: 38 47 08 cmp %al,0x8(%edi)
112f1e: 74 30 je 112f50 <rtems_task_mode+0xec>
asr->is_enabled = is_asr_enabled;
112f20: 88 47 08 mov %al,0x8(%edi)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
112f23: 9c pushf
112f24: fa cli
112f25: 58 pop %eax
_signals = information->signals_pending;
112f26: 8b 57 18 mov 0x18(%edi),%edx
information->signals_pending = information->signals_posted;
112f29: 8b 4f 14 mov 0x14(%edi),%ecx
112f2c: 89 4f 18 mov %ecx,0x18(%edi)
information->signals_posted = _signals;
112f2f: 89 57 14 mov %edx,0x14(%edi)
_ISR_Enable( _level );
112f32: 50 push %eax
112f33: 9d popf
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
112f34: 8b 47 14 mov 0x14(%edi),%eax
112f37: 85 c0 test %eax,%eax
112f39: 0f 95 c0 setne %al
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
112f3c: 83 3d e0 7f 12 00 03 cmpl $0x3,0x127fe0
112f43: 74 16 je 112f5b <rtems_task_mode+0xf7> <== ALWAYS TAKEN
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
112f45: 31 c0 xor %eax,%eax
}
112f47: 83 c4 1c add $0x1c,%esp
112f4a: 5b pop %ebx
112f4b: 5e pop %esi
112f4c: 5f pop %edi
112f4d: c9 leave
112f4e: c3 ret
112f4f: 90 nop
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
112f50: 31 c0 xor %eax,%eax
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
112f52: 83 3d e0 7f 12 00 03 cmpl $0x3,0x127fe0
112f59: 75 ea jne 112f45 <rtems_task_mode+0xe1> <== NEVER TAKEN
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
112f5b: 8b 15 f8 83 12 00 mov 0x1283f8,%edx
if ( are_signals_pending ||
112f61: 84 c0 test %al,%al
112f63: 75 0e jne 112f73 <rtems_task_mode+0x10f>
112f65: 3b 15 fc 83 12 00 cmp 0x1283fc,%edx
112f6b: 74 d8 je 112f45 <rtems_task_mode+0xe1>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
112f6d: 80 7a 74 00 cmpb $0x0,0x74(%edx)
112f71: 74 d2 je 112f45 <rtems_task_mode+0xe1> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
112f73: c6 05 04 84 12 00 01 movb $0x1,0x128404
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
112f7a: e8 11 a9 ff ff call 10d890 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
112f7f: 31 c0 xor %eax,%eax
}
112f81: 83 c4 1c add $0x1c,%esp
112f84: 5b pop %ebx
112f85: 5e pop %esi
112f86: 5f pop %edi
112f87: c9 leave
112f88: c3 ret
112f89: 8d 76 00 lea 0x0(%esi),%esi
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;
112f8c: 81 ce 00 02 00 00 or $0x200,%esi
112f92: e9 04 ff ff ff jmp 112e9b <rtems_task_mode+0x37>
112f97: 90 nop
112f98: fb sti
112f99: e9 6a ff ff ff jmp 112f08 <rtems_task_mode+0xa4>
112f9e: 66 90 xchg %ax,%ax
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;
112fa0: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
112fa7: f6 45 0c 01 testb $0x1,0xc(%ebp)
112fab: 0f 84 57 ff ff ff je 112f08 <rtems_task_mode+0xa4>
112fb1: e9 47 ff ff ff jmp 112efd <rtems_task_mode+0x99>
112fb6: 66 90 xchg %ax,%ax
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
112fb8: b8 09 00 00 00 mov $0x9,%eax
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
112fbd: 83 c4 1c add $0x1c,%esp
112fc0: 5b pop %ebx
112fc1: 5e pop %esi
112fc2: 5f pop %edi
112fc3: c9 leave
112fc4: c3 ret
0010ed24 <rtems_task_resume>:
*/
rtems_status_code rtems_task_resume(
rtems_id id
)
{
10ed24: 55 push %ebp
10ed25: 89 e5 mov %esp,%ebp
10ed27: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
10ed2a: 8d 45 f4 lea -0xc(%ebp),%eax
10ed2d: 50 push %eax
10ed2e: ff 75 08 pushl 0x8(%ebp)
10ed31: e8 2e 20 00 00 call 110d64 <_Thread_Get>
switch ( location ) {
10ed36: 83 c4 10 add $0x10,%esp
10ed39: 8b 55 f4 mov -0xc(%ebp),%edx
10ed3c: 85 d2 test %edx,%edx
10ed3e: 74 08 je 10ed48 <rtems_task_resume+0x24>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10ed40: b8 04 00 00 00 mov $0x4,%eax
}
10ed45: c9 leave
10ed46: c3 ret
10ed47: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
10ed48: f6 40 10 02 testb $0x2,0x10(%eax)
10ed4c: 75 0e jne 10ed5c <rtems_task_resume+0x38>
_Thread_Resume( the_thread, true );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10ed4e: e8 ed 1f 00 00 call 110d40 <_Thread_Enable_dispatch>
return RTEMS_INCORRECT_STATE;
10ed53: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ed58: c9 leave
10ed59: c3 ret
10ed5a: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
_Thread_Resume( the_thread, true );
10ed5c: 83 ec 08 sub $0x8,%esp
10ed5f: 6a 01 push $0x1
10ed61: 50 push %eax
10ed62: e8 e5 27 00 00 call 11154c <_Thread_Resume>
_Thread_Enable_dispatch();
10ed67: e8 d4 1f 00 00 call 110d40 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10ed6c: 83 c4 10 add $0x10,%esp
10ed6f: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10ed71: c9 leave
10ed72: c3 ret
0010d6a4 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
10d6a4: 55 push %ebp
10d6a5: 89 e5 mov %esp,%ebp
10d6a7: 56 push %esi
10d6a8: 53 push %ebx
10d6a9: 83 ec 10 sub $0x10,%esp
10d6ac: 8b 45 08 mov 0x8(%ebp),%eax
10d6af: 8b 5d 0c mov 0xc(%ebp),%ebx
10d6b2: 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() )
10d6b5: 80 3d a4 79 12 00 00 cmpb $0x0,0x1279a4
10d6bc: 74 66 je 10d724 <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 )
10d6be: 83 fb 0f cmp $0xf,%ebx
10d6c1: 77 39 ja 10d6fc <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 ) ||
10d6c3: 85 c0 test %eax,%eax
10d6c5: 74 41 je 10d708 <rtems_task_set_note+0x64>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
10d6c7: 8b 15 d8 c5 12 00 mov 0x12c5d8,%edx
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d6cd: 3b 42 08 cmp 0x8(%edx),%eax
10d6d0: 74 3c je 10d70e <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 );
10d6d2: 83 ec 08 sub $0x8,%esp
10d6d5: 8d 55 f4 lea -0xc(%ebp),%edx
10d6d8: 52 push %edx
10d6d9: 50 push %eax
10d6da: e8 95 21 00 00 call 10f874 <_Thread_Get>
switch ( location ) {
10d6df: 83 c4 10 add $0x10,%esp
10d6e2: 8b 55 f4 mov -0xc(%ebp),%edx
10d6e5: 85 d2 test %edx,%edx
10d6e7: 75 47 jne 10d730 <rtems_task_set_note+0x8c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10d6e9: 8b 80 e8 00 00 00 mov 0xe8(%eax),%eax
10d6ef: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4)
_Thread_Enable_dispatch();
10d6f3: e8 58 21 00 00 call 10f850 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10d6f8: 31 c0 xor %eax,%eax
10d6fa: eb 05 jmp 10d701 <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;
10d6fc: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d701: 8d 65 f8 lea -0x8(%ebp),%esp
10d704: 5b pop %ebx
10d705: 5e pop %esi
10d706: c9 leave
10d707: c3 ret
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
10d708: 8b 15 d8 c5 12 00 mov 0x12c5d8,%edx
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
10d70e: 8b 82 e8 00 00 00 mov 0xe8(%edx),%eax
10d714: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4)
return RTEMS_SUCCESSFUL;
10d718: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d71a: 8d 65 f8 lea -0x8(%ebp),%esp
10d71d: 5b pop %ebx
10d71e: 5e pop %esi
10d71f: c9 leave
10d720: c3 ret
10d721: 8d 76 00 lea 0x0(%esi),%esi
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
10d724: b8 16 00 00 00 mov $0x16,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10d729: 8d 65 f8 lea -0x8(%ebp),%esp
10d72c: 5b pop %ebx
10d72d: 5e pop %esi
10d72e: c9 leave
10d72f: c3 ret
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10d730: b8 04 00 00 00 mov $0x4,%eax
}
10d735: 8d 65 f8 lea -0x8(%ebp),%esp
10d738: 5b pop %ebx
10d739: 5e pop %esi
10d73a: c9 leave
10d73b: c3 ret
0010f9e8 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
10f9e8: 55 push %ebp
10f9e9: 89 e5 mov %esp,%ebp
10f9eb: 56 push %esi
10f9ec: 53 push %ebx
10f9ed: 83 ec 10 sub $0x10,%esp
10f9f0: 8b 5d 0c mov 0xc(%ebp),%ebx
10f9f3: 8b 75 10 mov 0x10(%ebp),%esi
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
10f9f6: 85 db test %ebx,%ebx
10f9f8: 74 0b je 10fa05 <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 ) );
10f9fa: 0f b6 05 f4 7a 12 00 movzbl 0x127af4,%eax
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
10fa01: 39 c3 cmp %eax,%ebx
10fa03: 77 5f ja 10fa64 <rtems_task_set_priority+0x7c>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
10fa05: 85 f6 test %esi,%esi
10fa07: 74 67 je 10fa70 <rtems_task_set_priority+0x88>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10fa09: 83 ec 08 sub $0x8,%esp
10fa0c: 8d 45 f4 lea -0xc(%ebp),%eax
10fa0f: 50 push %eax
10fa10: ff 75 08 pushl 0x8(%ebp)
10fa13: e8 8c 21 00 00 call 111ba4 <_Thread_Get>
switch ( location ) {
10fa18: 83 c4 10 add $0x10,%esp
10fa1b: 8b 55 f4 mov -0xc(%ebp),%edx
10fa1e: 85 d2 test %edx,%edx
10fa20: 75 36 jne 10fa58 <rtems_task_set_priority+0x70>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
10fa22: 8b 50 14 mov 0x14(%eax),%edx
10fa25: 89 16 mov %edx,(%esi)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
10fa27: 85 db test %ebx,%ebx
10fa29: 74 1c je 10fa47 <rtems_task_set_priority+0x5f>
the_thread->real_priority = new_priority;
10fa2b: 89 58 18 mov %ebx,0x18(%eax)
if ( the_thread->resource_count == 0 ||
10fa2e: 8b 48 1c mov 0x1c(%eax),%ecx
10fa31: 85 c9 test %ecx,%ecx
10fa33: 74 05 je 10fa3a <rtems_task_set_priority+0x52>
10fa35: 3b 58 14 cmp 0x14(%eax),%ebx
10fa38: 73 0d jae 10fa47 <rtems_task_set_priority+0x5f><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
10fa3a: 52 push %edx
10fa3b: 6a 00 push $0x0
10fa3d: 53 push %ebx
10fa3e: 50 push %eax
10fa3f: e8 04 1d 00 00 call 111748 <_Thread_Change_priority>
10fa44: 83 c4 10 add $0x10,%esp
}
_Thread_Enable_dispatch();
10fa47: e8 34 21 00 00 call 111b80 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10fa4c: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa4e: 8d 65 f8 lea -0x8(%ebp),%esp
10fa51: 5b pop %ebx
10fa52: 5e pop %esi
10fa53: c9 leave
10fa54: c3 ret
10fa55: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10fa58: b8 04 00 00 00 mov $0x4,%eax
}
10fa5d: 8d 65 f8 lea -0x8(%ebp),%esp
10fa60: 5b pop %ebx
10fa61: 5e pop %esi
10fa62: c9 leave
10fa63: 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;
10fa64: b8 13 00 00 00 mov $0x13,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa69: 8d 65 f8 lea -0x8(%ebp),%esp
10fa6c: 5b pop %ebx
10fa6d: 5e pop %esi
10fa6e: c9 leave
10fa6f: 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;
10fa70: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10fa75: 8d 65 f8 lea -0x8(%ebp),%esp
10fa78: 5b pop %ebx
10fa79: 5e pop %esi
10fa7a: c9 leave
10fa7b: c3 ret
0010bb3c <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
10bb3c: 55 push %ebp
10bb3d: 89 e5 mov %esp,%ebp
10bb3f: 53 push %ebx
10bb40: 83 ec 14 sub $0x14,%esp
10bb43: 8b 5d 0c mov 0xc(%ebp),%ebx
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
10bb46: 85 db test %ebx,%ebx
10bb48: 74 4e je 10bb98 <rtems_task_start+0x5c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
10bb4a: 83 ec 08 sub $0x8,%esp
10bb4d: 8d 45 f4 lea -0xc(%ebp),%eax
10bb50: 50 push %eax
10bb51: ff 75 08 pushl 0x8(%ebp)
10bb54: e8 d3 1e 00 00 call 10da2c <_Thread_Get>
switch ( location ) {
10bb59: 83 c4 10 add $0x10,%esp
10bb5c: 8b 55 f4 mov -0xc(%ebp),%edx
10bb5f: 85 d2 test %edx,%edx
10bb61: 75 29 jne 10bb8c <rtems_task_start+0x50>
case OBJECTS_LOCAL:
if ( _Thread_Start(
10bb63: 83 ec 0c sub $0xc,%esp
10bb66: ff 75 10 pushl 0x10(%ebp)
10bb69: 6a 00 push $0x0
10bb6b: 53 push %ebx
10bb6c: 6a 00 push $0x0
10bb6e: 50 push %eax
10bb6f: e8 20 28 00 00 call 10e394 <_Thread_Start>
10bb74: 83 c4 20 add $0x20,%esp
10bb77: 84 c0 test %al,%al
10bb79: 75 29 jne 10bba4 <rtems_task_start+0x68>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
10bb7b: e8 88 1e 00 00 call 10da08 <_Thread_Enable_dispatch>
return RTEMS_INCORRECT_STATE;
10bb80: b8 0e 00 00 00 mov $0xe,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bb85: 8b 5d fc mov -0x4(%ebp),%ebx
10bb88: c9 leave
10bb89: c3 ret
10bb8a: 66 90 xchg %ax,%ax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10bb8c: b8 04 00 00 00 mov $0x4,%eax
}
10bb91: 8b 5d fc mov -0x4(%ebp),%ebx
10bb94: c9 leave
10bb95: c3 ret
10bb96: 66 90 xchg %ax,%ax
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
10bb98: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bb9d: 8b 5d fc mov -0x4(%ebp),%ebx
10bba0: c9 leave
10bba1: c3 ret
10bba2: 66 90 xchg %ax,%ax
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
10bba4: e8 5f 1e 00 00 call 10da08 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10bba9: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10bbab: 8b 5d fc mov -0x4(%ebp),%ebx
10bbae: c9 leave
10bbaf: c3 ret
00110fd0 <rtems_task_suspend>:
*/
rtems_status_code rtems_task_suspend(
rtems_id id
)
{
110fd0: 55 push %ebp
110fd1: 89 e5 mov %esp,%ebp
110fd3: 83 ec 20 sub $0x20,%esp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
110fd6: 8d 45 f4 lea -0xc(%ebp),%eax
110fd9: 50 push %eax
110fda: ff 75 08 pushl 0x8(%ebp)
110fdd: e8 4a ca ff ff call 10da2c <_Thread_Get>
switch ( location ) {
110fe2: 83 c4 10 add $0x10,%esp
110fe5: 8b 55 f4 mov -0xc(%ebp),%edx
110fe8: 85 d2 test %edx,%edx
110fea: 74 08 je 110ff4 <rtems_task_suspend+0x24>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
110fec: b8 04 00 00 00 mov $0x4,%eax
}
110ff1: c9 leave
110ff2: c3 ret
110ff3: 90 nop
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
110ff4: f6 40 10 02 testb $0x2,0x10(%eax)
110ff8: 74 0e je 111008 <rtems_task_suspend+0x38>
_Thread_Suspend( the_thread );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
110ffa: e8 09 ca ff ff call 10da08 <_Thread_Enable_dispatch>
return RTEMS_ALREADY_SUSPENDED;
110fff: b8 0f 00 00 00 mov $0xf,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
111004: c9 leave
111005: c3 ret
111006: 66 90 xchg %ax,%ax
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Suspend( the_thread );
111008: 83 ec 0c sub $0xc,%esp
11100b: 50 push %eax
11100c: e8 3b 09 00 00 call 11194c <_Thread_Suspend>
_Thread_Enable_dispatch();
111011: e8 f2 c9 ff ff call 10da08 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
111016: 83 c4 10 add $0x10,%esp
111019: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11101b: c9 leave
11101c: c3 ret
0010c6a8 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
10c6a8: 55 push %ebp
10c6a9: 89 e5 mov %esp,%ebp
10c6ab: 57 push %edi
10c6ac: 56 push %esi
10c6ad: 53 push %ebx
10c6ae: 83 ec 1c sub $0x1c,%esp
10c6b1: 8b 5d 0c mov 0xc(%ebp),%ebx
10c6b4: 8b 7d 10 mov 0x10(%ebp),%edi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
10c6b7: 85 db test %ebx,%ebx
10c6b9: 0f 84 9d 00 00 00 je 10c75c <rtems_task_variable_add+0xb4>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10c6bf: 83 ec 08 sub $0x8,%esp
10c6c2: 8d 45 e4 lea -0x1c(%ebp),%eax
10c6c5: 50 push %eax
10c6c6: ff 75 08 pushl 0x8(%ebp)
10c6c9: e8 7e 20 00 00 call 10e74c <_Thread_Get>
10c6ce: 89 c6 mov %eax,%esi
switch (location) {
10c6d0: 83 c4 10 add $0x10,%esp
10c6d3: 8b 45 e4 mov -0x1c(%ebp),%eax
10c6d6: 85 c0 test %eax,%eax
10c6d8: 74 0e je 10c6e8 <rtems_task_variable_add+0x40>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c6da: b8 04 00 00 00 mov $0x4,%eax
}
10c6df: 8d 65 f4 lea -0xc(%ebp),%esp
10c6e2: 5b pop %ebx
10c6e3: 5e pop %esi
10c6e4: 5f pop %edi
10c6e5: c9 leave
10c6e6: c3 ret
10c6e7: 90 nop
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
10c6e8: 8b 86 f4 00 00 00 mov 0xf4(%esi),%eax
while (tvp) {
10c6ee: 85 c0 test %eax,%eax
10c6f0: 75 44 jne 10c736 <rtems_task_variable_add+0x8e>
10c6f2: 66 90 xchg %ax,%ax
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
10c6f4: 83 ec 0c sub $0xc,%esp
10c6f7: 6a 14 push $0x14
10c6f9: e8 06 30 00 00 call 10f704 <_Workspace_Allocate>
if (new == NULL) {
10c6fe: 83 c4 10 add $0x10,%esp
10c701: 85 c0 test %eax,%eax
10c703: 74 4b je 10c750 <rtems_task_variable_add+0xa8>
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
10c705: 8b 13 mov (%ebx),%edx
10c707: 89 50 08 mov %edx,0x8(%eax)
new->ptr = ptr;
10c70a: 89 58 04 mov %ebx,0x4(%eax)
new->dtor = dtor;
10c70d: 89 78 10 mov %edi,0x10(%eax)
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
10c710: 8b 96 f4 00 00 00 mov 0xf4(%esi),%edx
10c716: 89 10 mov %edx,(%eax)
the_thread->task_variables = new;
10c718: 89 86 f4 00 00 00 mov %eax,0xf4(%esi)
_Thread_Enable_dispatch();
10c71e: e8 05 20 00 00 call 10e728 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c723: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c725: 8d 65 f4 lea -0xc(%ebp),%esp
10c728: 5b pop %ebx
10c729: 5e pop %esi
10c72a: 5f pop %edi
10c72b: c9 leave
10c72c: c3 ret
10c72d: 8d 76 00 lea 0x0(%esi),%esi
if (tvp->ptr == ptr) {
tvp->dtor = dtor;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10c730: 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) {
10c732: 85 c0 test %eax,%eax
10c734: 74 be je 10c6f4 <rtems_task_variable_add+0x4c>
if (tvp->ptr == ptr) {
10c736: 39 58 04 cmp %ebx,0x4(%eax)
10c739: 75 f5 jne 10c730 <rtems_task_variable_add+0x88>
tvp->dtor = dtor;
10c73b: 89 78 10 mov %edi,0x10(%eax)
_Thread_Enable_dispatch();
10c73e: e8 e5 1f 00 00 call 10e728 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c743: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c745: 8d 65 f4 lea -0xc(%ebp),%esp
10c748: 5b pop %ebx
10c749: 5e pop %esi
10c74a: 5f pop %edi
10c74b: c9 leave
10c74c: c3 ret
10c74d: 8d 76 00 lea 0x0(%esi),%esi
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
10c750: e8 d3 1f 00 00 call 10e728 <_Thread_Enable_dispatch>
return RTEMS_NO_MEMORY;
10c755: b8 1a 00 00 00 mov $0x1a,%eax
10c75a: eb 83 jmp 10c6df <rtems_task_variable_add+0x37>
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
10c75c: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c761: 8d 65 f4 lea -0xc(%ebp),%esp
10c764: 5b pop %ebx
10c765: 5e pop %esi
10c766: 5f pop %edi
10c767: c9 leave
10c768: c3 ret
0010c76c <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
10c76c: 55 push %ebp
10c76d: 89 e5 mov %esp,%ebp
10c76f: 53 push %ebx
10c770: 83 ec 14 sub $0x14,%esp
10c773: 8b 5d 0c mov 0xc(%ebp),%ebx
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
10c776: 85 db test %ebx,%ebx
10c778: 74 76 je 10c7f0 <rtems_task_variable_delete+0x84>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
10c77a: 83 ec 08 sub $0x8,%esp
10c77d: 8d 45 f4 lea -0xc(%ebp),%eax
10c780: 50 push %eax
10c781: ff 75 08 pushl 0x8(%ebp)
10c784: e8 c3 1f 00 00 call 10e74c <_Thread_Get>
switch (location) {
10c789: 83 c4 10 add $0x10,%esp
10c78c: 8b 55 f4 mov -0xc(%ebp),%edx
10c78f: 85 d2 test %edx,%edx
10c791: 74 0d je 10c7a0 <rtems_task_variable_delete+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c793: b8 04 00 00 00 mov $0x4,%eax
}
10c798: 8b 5d fc mov -0x4(%ebp),%ebx
10c79b: c9 leave
10c79c: c3 ret
10c79d: 8d 76 00 lea 0x0(%esi),%esi
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
10c7a0: 8b 88 f4 00 00 00 mov 0xf4(%eax),%ecx
while (tvp) {
10c7a6: 85 c9 test %ecx,%ecx
10c7a8: 74 17 je 10c7c1 <rtems_task_variable_delete+0x55>
if (tvp->ptr == ptr) {
10c7aa: 39 59 04 cmp %ebx,0x4(%ecx)
10c7ad: 75 0c jne 10c7bb <rtems_task_variable_delete+0x4f>
10c7af: eb 49 jmp 10c7fa <rtems_task_variable_delete+0x8e>
10c7b1: 8d 76 00 lea 0x0(%esi),%esi
10c7b4: 39 5a 04 cmp %ebx,0x4(%edx)
10c7b7: 74 17 je 10c7d0 <rtems_task_variable_delete+0x64>
10c7b9: 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;
10c7bb: 8b 11 mov (%ecx),%edx
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
10c7bd: 85 d2 test %edx,%edx
10c7bf: 75 f3 jne 10c7b4 <rtems_task_variable_delete+0x48><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10c7c1: e8 62 1f 00 00 call 10e728 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
10c7c6: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c7cb: 8b 5d fc mov -0x4(%ebp),%ebx
10c7ce: c9 leave
10c7cf: c3 ret
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
10c7d0: 8b 1a mov (%edx),%ebx
10c7d2: 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 );
10c7d4: 83 ec 08 sub $0x8,%esp
10c7d7: 52 push %edx
10c7d8: 50 push %eax
10c7d9: e8 b2 00 00 00 call 10c890 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
10c7de: e8 45 1f 00 00 call 10e728 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c7e3: 83 c4 10 add $0x10,%esp
10c7e6: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c7e8: 8b 5d fc mov -0x4(%ebp),%ebx
10c7eb: c9 leave
10c7ec: c3 ret
10c7ed: 8d 76 00 lea 0x0(%esi),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
10c7f0: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c7f5: 8b 5d fc mov -0x4(%ebp),%ebx
10c7f8: c9 leave
10c7f9: 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;
10c7fa: 8b 11 mov (%ecx),%edx
10c7fc: 89 90 f4 00 00 00 mov %edx,0xf4(%eax)
10c802: 89 ca mov %ecx,%edx
10c804: eb ce jmp 10c7d4 <rtems_task_variable_delete+0x68>
0010c808 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
10c808: 55 push %ebp
10c809: 89 e5 mov %esp,%ebp
10c80b: 56 push %esi
10c80c: 53 push %ebx
10c80d: 83 ec 10 sub $0x10,%esp
10c810: 8b 5d 0c mov 0xc(%ebp),%ebx
10c813: 8b 75 10 mov 0x10(%ebp),%esi
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
10c816: 85 db test %ebx,%ebx
10c818: 74 56 je 10c870 <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
if ( !result )
10c81a: 85 f6 test %esi,%esi
10c81c: 74 52 je 10c870 <rtems_task_variable_get+0x68>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
10c81e: 83 ec 08 sub $0x8,%esp
10c821: 8d 45 f4 lea -0xc(%ebp),%eax
10c824: 50 push %eax
10c825: ff 75 08 pushl 0x8(%ebp)
10c828: e8 1f 1f 00 00 call 10e74c <_Thread_Get>
switch (location) {
10c82d: 83 c4 10 add $0x10,%esp
10c830: 8b 55 f4 mov -0xc(%ebp),%edx
10c833: 85 d2 test %edx,%edx
10c835: 75 2d jne 10c864 <rtems_task_variable_get+0x5c>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
10c837: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax
while (tvp) {
10c83d: 85 c0 test %eax,%eax
10c83f: 75 09 jne 10c84a <rtems_task_variable_get+0x42>
10c841: eb 39 jmp 10c87c <rtems_task_variable_get+0x74>
10c843: 90 nop
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
10c844: 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) {
10c846: 85 c0 test %eax,%eax
10c848: 74 32 je 10c87c <rtems_task_variable_get+0x74><== NEVER TAKEN
if (tvp->ptr == ptr) {
10c84a: 39 58 04 cmp %ebx,0x4(%eax)
10c84d: 75 f5 jne 10c844 <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;
10c84f: 8b 40 0c mov 0xc(%eax),%eax
10c852: 89 06 mov %eax,(%esi)
_Thread_Enable_dispatch();
10c854: e8 cf 1e 00 00 call 10e728 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c859: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c85b: 8d 65 f8 lea -0x8(%ebp),%esp
10c85e: 5b pop %ebx
10c85f: 5e pop %esi
10c860: c9 leave
10c861: c3 ret
10c862: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c864: b8 04 00 00 00 mov $0x4,%eax
}
10c869: 8d 65 f8 lea -0x8(%ebp),%esp
10c86c: 5b pop %ebx
10c86d: 5e pop %esi
10c86e: c9 leave
10c86f: c3 ret
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
10c870: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c875: 8d 65 f8 lea -0x8(%ebp),%esp
10c878: 5b pop %ebx
10c879: 5e pop %esi
10c87a: c9 leave
10c87b: c3 ret
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
10c87c: e8 a7 1e 00 00 call 10e728 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
10c881: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c886: 8d 65 f8 lea -0x8(%ebp),%esp
10c889: 5b pop %ebx
10c88a: 5e pop %esi
10c88b: c9 leave
10c88c: c3 ret
0010ca08 <rtems_task_wake_when>:
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
10ca08: 55 push %ebp
10ca09: 89 e5 mov %esp,%ebp
10ca0b: 53 push %ebx
10ca0c: 83 ec 14 sub $0x14,%esp
10ca0f: 8b 5d 08 mov 0x8(%ebp),%ebx
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
10ca12: 80 3d 64 ab 12 00 00 cmpb $0x0,0x12ab64
10ca19: 0f 84 a9 00 00 00 je 10cac8 <rtems_task_wake_when+0xc0>
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
10ca1f: 85 db test %ebx,%ebx
10ca21: 0f 84 ad 00 00 00 je 10cad4 <rtems_task_wake_when+0xcc>
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
10ca27: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx)
if ( !_TOD_Validate( time_buffer ) )
10ca2e: 83 ec 0c sub $0xc,%esp
10ca31: 53 push %ebx
10ca32: e8 d1 f3 ff ff call 10be08 <_TOD_Validate>
10ca37: 83 c4 10 add $0x10,%esp
10ca3a: 84 c0 test %al,%al
10ca3c: 75 0a jne 10ca48 <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;
10ca3e: b8 14 00 00 00 mov $0x14,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10ca43: 8b 5d fc mov -0x4(%ebp),%ebx
10ca46: c9 leave
10ca47: c3 ret
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
10ca48: 83 ec 0c sub $0xc,%esp
10ca4b: 53 push %ebx
10ca4c: e8 2b f3 ff ff call 10bd7c <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
10ca51: 83 c4 10 add $0x10,%esp
10ca54: 3b 05 e8 ab 12 00 cmp 0x12abe8,%eax
10ca5a: 76 e2 jbe 10ca3e <rtems_task_wake_when+0x36>
10ca5c: 8b 15 50 ab 12 00 mov 0x12ab50,%edx
10ca62: 42 inc %edx
10ca63: 89 15 50 ab 12 00 mov %edx,0x12ab50
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
10ca69: 83 ec 08 sub $0x8,%esp
10ca6c: 6a 10 push $0x10
10ca6e: ff 35 f8 b0 12 00 pushl 0x12b0f8
10ca74: 89 45 f4 mov %eax,-0xc(%ebp)
10ca77: e8 00 27 00 00 call 10f17c <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
10ca7c: 8b 15 f8 b0 12 00 mov 0x12b0f8,%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(
10ca82: 8b 4a 08 mov 0x8(%edx),%ecx
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10ca85: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx)
the_watchdog->routine = routine;
10ca8c: c7 42 64 a4 e7 10 00 movl $0x10e7a4,0x64(%edx)
the_watchdog->id = id;
10ca93: 89 4a 68 mov %ecx,0x68(%edx)
the_watchdog->user_data = user_data;
10ca96: 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(
10ca9d: 8b 45 f4 mov -0xc(%ebp),%eax
10caa0: 2b 05 e8 ab 12 00 sub 0x12abe8,%eax
10caa6: 89 42 54 mov %eax,0x54(%edx)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
10caa9: 58 pop %eax
10caaa: 59 pop %ecx
10caab: 83 c2 48 add $0x48,%edx
10caae: 52 push %edx
10caaf: 68 14 ac 12 00 push $0x12ac14
10cab4: e8 8b 2c 00 00 call 10f744 <_Watchdog_Insert>
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
10cab9: e8 9a 1e 00 00 call 10e958 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10cabe: 83 c4 10 add $0x10,%esp
10cac1: 31 c0 xor %eax,%eax
10cac3: e9 7b ff ff ff jmp 10ca43 <rtems_task_wake_when+0x3b>
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
10cac8: b8 0b 00 00 00 mov $0xb,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10cacd: 8b 5d fc mov -0x4(%ebp),%ebx
10cad0: c9 leave
10cad1: c3 ret
10cad2: 66 90 xchg %ax,%ax
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
10cad4: b8 09 00 00 00 mov $0x9,%eax
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10cad9: 8b 5d fc mov -0x4(%ebp),%ebx
10cadc: c9 leave
10cadd: c3 ret
0010a914 <rtems_termios_baud_to_index>:
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
10a914: 55 push %ebp
10a915: 89 e5 mov %esp,%ebp
10a917: 8b 45 08 mov 0x8(%ebp),%eax
int baud_index;
switch (termios_baud) {
10a91a: 83 f8 09 cmp $0x9,%eax
10a91d: 0f 84 f1 00 00 00 je 10aa14 <rtems_termios_baud_to_index+0x100>
10a923: 7e 37 jle 10a95c <rtems_termios_baud_to_index+0x48>
10a925: 83 f8 0e cmp $0xe,%eax
10a928: 0f 84 f6 00 00 00 je 10aa24 <rtems_termios_baud_to_index+0x110>
10a92e: 7e 5c jle 10a98c <rtems_termios_baud_to_index+0x78>
10a930: 3d 02 10 00 00 cmp $0x1002,%eax
10a935: 0f 84 01 01 00 00 je 10aa3c <rtems_termios_baud_to_index+0x128>
10a93b: 0f 8e 97 00 00 00 jle 10a9d8 <rtems_termios_baud_to_index+0xc4>
10a941: 3d 03 10 00 00 cmp $0x1003,%eax
10a946: 0f 84 e0 00 00 00 je 10aa2c <rtems_termios_baud_to_index+0x118>
10a94c: 3d 04 10 00 00 cmp $0x1004,%eax
10a951: 75 51 jne 10a9a4 <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;
10a953: b8 13 00 00 00 mov $0x13,%eax
default: baud_index = -1; break;
}
return baud_index;
}
10a958: c9 leave
10a959: c3 ret
10a95a: 66 90 xchg %ax,%ax
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a95c: 83 f8 04 cmp $0x4,%eax
10a95f: 0f 84 b7 00 00 00 je 10aa1c <rtems_termios_baud_to_index+0x108>
10a965: 7f 45 jg 10a9ac <rtems_termios_baud_to_index+0x98>
10a967: 83 f8 01 cmp $0x1,%eax
10a96a: 0f 84 8c 00 00 00 je 10a9fc <rtems_termios_baud_to_index+0xe8>
10a970: 0f 8e de 00 00 00 jle 10aa54 <rtems_termios_baud_to_index+0x140>
10a976: 83 f8 02 cmp $0x2,%eax
10a979: 0f 84 c5 00 00 00 je 10aa44 <rtems_termios_baud_to_index+0x130>
10a97f: 83 f8 03 cmp $0x3,%eax
10a982: 75 20 jne 10a9a4 <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;
10a984: b8 03 00 00 00 mov $0x3,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a989: c9 leave
10a98a: c3 ret
10a98b: 90 nop
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a98c: 83 f8 0b cmp $0xb,%eax
10a98f: 0f 84 9f 00 00 00 je 10aa34 <rtems_termios_baud_to_index+0x120>
10a995: 7c 39 jl 10a9d0 <rtems_termios_baud_to_index+0xbc>
10a997: 83 f8 0c cmp $0xc,%eax
10a99a: 74 50 je 10a9ec <rtems_termios_baud_to_index+0xd8>
10a99c: 83 f8 0d cmp $0xd,%eax
10a99f: 74 62 je 10aa03 <rtems_termios_baud_to_index+0xef><== ALWAYS TAKEN
10a9a1: 8d 76 00 lea 0x0(%esi),%esi
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;
10a9a4: b8 ff ff ff ff mov $0xffffffff,%eax
}
return baud_index;
}
10a9a9: c9 leave
10a9aa: c3 ret
10a9ab: 90 nop
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a9ac: 83 f8 06 cmp $0x6,%eax
10a9af: 74 43 je 10a9f4 <rtems_termios_baud_to_index+0xe0>
10a9b1: 7c 15 jl 10a9c8 <rtems_termios_baud_to_index+0xb4>
10a9b3: 83 f8 07 cmp $0x7,%eax
10a9b6: 0f 84 90 00 00 00 je 10aa4c <rtems_termios_baud_to_index+0x138>
10a9bc: 83 f8 08 cmp $0x8,%eax
10a9bf: 75 e3 jne 10a9a4 <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;
10a9c1: b8 08 00 00 00 mov $0x8,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9c6: c9 leave
10a9c7: 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;
10a9c8: b8 05 00 00 00 mov $0x5,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9cd: c9 leave
10a9ce: c3 ret
10a9cf: 90 nop
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;
10a9d0: b8 0a 00 00 00 mov $0xa,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9d5: c9 leave
10a9d6: c3 ret
10a9d7: 90 nop
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10a9d8: 83 f8 0f cmp $0xf,%eax
10a9db: 74 2f je 10aa0c <rtems_termios_baud_to_index+0xf8>
10a9dd: 3d 01 10 00 00 cmp $0x1001,%eax
10a9e2: 75 c0 jne 10a9a4 <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;
10a9e4: b8 10 00 00 00 mov $0x10,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9e9: c9 leave
10a9ea: c3 ret
10a9eb: 90 nop
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;
10a9ec: b8 0c 00 00 00 mov $0xc,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9f1: c9 leave
10a9f2: c3 ret
10a9f3: 90 nop
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;
10a9f4: b8 06 00 00 00 mov $0x6,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10a9f9: c9 leave
10a9fa: c3 ret
10a9fb: 90 nop
{
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
10a9fc: b8 01 00 00 00 mov $0x1,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa01: c9 leave
10aa02: 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;
10aa03: b8 0d 00 00 00 mov $0xd,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa08: c9 leave
10aa09: c3 ret
10aa0a: 66 90 xchg %ax,%ax
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;
10aa0c: b8 0f 00 00 00 mov $0xf,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa11: c9 leave
10aa12: c3 ret
10aa13: 90 nop
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;
10aa14: b8 09 00 00 00 mov $0x9,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa19: c9 leave
10aa1a: c3 ret
10aa1b: 90 nop
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;
10aa1c: b8 04 00 00 00 mov $0x4,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa21: c9 leave
10aa22: c3 ret
10aa23: 90 nop
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;
10aa24: b8 0e 00 00 00 mov $0xe,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa29: c9 leave
10aa2a: c3 ret
10aa2b: 90 nop
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;
10aa2c: b8 12 00 00 00 mov $0x12,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa31: c9 leave
10aa32: c3 ret
10aa33: 90 nop
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;
10aa34: b8 0b 00 00 00 mov $0xb,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa39: c9 leave
10aa3a: c3 ret
10aa3b: 90 nop
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;
10aa3c: b8 11 00 00 00 mov $0x11,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa41: c9 leave
10aa42: c3 ret
10aa43: 90 nop
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
10aa44: b8 02 00 00 00 mov $0x2,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa49: c9 leave
10aa4a: c3 ret
10aa4b: 90 nop
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;
10aa4c: b8 07 00 00 00 mov $0x7,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa51: c9 leave
10aa52: c3 ret
10aa53: 90 nop
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
10aa54: 85 c0 test %eax,%eax
10aa56: 0f 85 48 ff ff ff jne 10a9a4 <rtems_termios_baud_to_index+0x90>
case B0: baud_index = 0; break;
10aa5c: 31 c0 xor %eax,%eax
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
10aa5e: c9 leave
10aa5f: c3 ret
00108f80 <rtems_termios_baud_to_number>:
extern rtems_assoc_t termios_assoc_table[];
int32_t rtems_termios_baud_to_number(
int termios_baud
)
{
108f80: 55 push %ebp
108f81: 89 e5 mov %esp,%ebp
108f83: 53 push %ebx
108f84: 83 ec 0c sub $0xc,%esp
108f87: 8b 5d 08 mov 0x8(%ebp),%ebx
int baud;
baud = rtems_assoc_local_by_remote( termios_assoc_table, termios_baud );
108f8a: 53 push %ebx
108f8b: 68 40 59 12 00 push $0x125940
108f90: e8 8b 6c 00 00 call 10fc20 <rtems_assoc_local_by_remote>
if ( baud == 0 && termios_baud != 0 )
108f95: 83 c4 10 add $0x10,%esp
108f98: 85 c0 test %eax,%eax
108f9a: 74 08 je 108fa4 <rtems_termios_baud_to_number+0x24>
return -1;
return baud;
}
108f9c: 8b 5d fc mov -0x4(%ebp),%ebx
108f9f: c9 leave
108fa0: c3 ret
108fa1: 8d 76 00 lea 0x0(%esi),%esi
)
{
int baud;
baud = rtems_assoc_local_by_remote( termios_assoc_table, termios_baud );
if ( baud == 0 && termios_baud != 0 )
108fa4: 83 fb 01 cmp $0x1,%ebx
108fa7: 19 c0 sbb %eax,%eax
108fa9: f7 d0 not %eax
108fab: eb ef jmp 108f9c <rtems_termios_baud_to_number+0x1c>
00109504 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
109504: 55 push %ebp
109505: 89 e5 mov %esp,%ebp
109507: 56 push %esi
109508: 53 push %ebx
109509: 8b 75 08 mov 0x8(%ebp),%esi
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10950c: 8b 06 mov (%esi),%eax
10950e: 8b 58 34 mov 0x34(%eax),%ebx
rtems_status_code sc;
sc = rtems_semaphore_obtain(
109511: 52 push %edx
109512: 6a 00 push $0x0
109514: 6a 00 push $0x0
109516: ff 35 2c 7d 12 00 pushl 0x127d2c
10951c: e8 d7 21 00 00 call 10b6f8 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
109521: 83 c4 10 add $0x10,%esp
109524: 85 c0 test %eax,%eax
109526: 0f 85 9a 01 00 00 jne 1096c6 <rtems_termios_close+0x1c2><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
10952c: 8b 43 08 mov 0x8(%ebx),%eax
10952f: 48 dec %eax
109530: 89 43 08 mov %eax,0x8(%ebx)
109533: 85 c0 test %eax,%eax
109535: 0f 85 bf 00 00 00 jne 1095fa <rtems_termios_close+0xf6>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
10953b: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
109541: c1 e0 05 shl $0x5,%eax
109544: 8b 80 c4 79 12 00 mov 0x1279c4(%eax),%eax
10954a: 85 c0 test %eax,%eax
10954c: 0f 84 0a 01 00 00 je 10965c <rtems_termios_close+0x158>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
109552: 83 ec 0c sub $0xc,%esp
109555: 53 push %ebx
109556: ff d0 call *%eax
109558: 83 c4 10 add $0x10,%esp
}
drainOutput (tty);
rtems_semaphore_release (tty->osem);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10955b: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
109562: 0f 84 2c 01 00 00 je 109694 <rtems_termios_close+0x190><== 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)
109568: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax
10956e: 85 c0 test %eax,%eax
109570: 74 0d je 10957f <rtems_termios_close+0x7b>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
109572: 51 push %ecx
109573: 56 push %esi
109574: ff 73 10 pushl 0x10(%ebx)
109577: ff 73 0c pushl 0xc(%ebx)
10957a: ff d0 call *%eax
10957c: 83 c4 10 add $0x10,%esp
if (tty->forw == NULL) {
10957f: 8b 03 mov (%ebx),%eax
109581: 85 c0 test %eax,%eax
109583: 0f 84 b7 00 00 00 je 109640 <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;
109589: 8b 53 04 mov 0x4(%ebx),%edx
10958c: 89 50 04 mov %edx,0x4(%eax)
10958f: 8b 53 04 mov 0x4(%ebx),%edx
}
if (tty->back == NULL) {
109592: 85 d2 test %edx,%edx
109594: 0f 84 8a 00 00 00 je 109624 <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;
10959a: 89 02 mov %eax,(%edx)
}
rtems_semaphore_delete (tty->isem);
10959c: 83 ec 0c sub $0xc,%esp
10959f: ff 73 14 pushl 0x14(%ebx)
1095a2: e8 ad 20 00 00 call 10b654 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
1095a7: 5a pop %edx
1095a8: ff 73 18 pushl 0x18(%ebx)
1095ab: e8 a4 20 00 00 call 10b654 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
1095b0: 58 pop %eax
1095b1: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
1095b7: e8 98 20 00 00 call 10b654 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
1095bc: 83 c4 10 add $0x10,%esp
1095bf: 8b b3 a0 00 00 00 mov 0xa0(%ebx),%esi
1095c5: 85 f6 test %esi,%esi
1095c7: 74 4b je 109614 <rtems_termios_close+0x110>
1095c9: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
1095d0: 74 42 je 109614 <rtems_termios_close+0x110>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
1095d2: 83 ec 0c sub $0xc,%esp
1095d5: ff 73 58 pushl 0x58(%ebx)
1095d8: e8 f7 ea ff ff call 1080d4 <free>
free (tty->rawOutBuf.theBuf);
1095dd: 59 pop %ecx
1095de: ff 73 7c pushl 0x7c(%ebx)
1095e1: e8 ee ea ff ff call 1080d4 <free>
free (tty->cbuf);
1095e6: 5a pop %edx
1095e7: ff 73 1c pushl 0x1c(%ebx)
1095ea: e8 e5 ea ff ff call 1080d4 <free>
free (tty);
1095ef: 89 1c 24 mov %ebx,(%esp)
1095f2: e8 dd ea ff ff call 1080d4 <free>
1095f7: 83 c4 10 add $0x10,%esp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
1095fa: 83 ec 0c sub $0xc,%esp
1095fd: ff 35 2c 7d 12 00 pushl 0x127d2c
109603: e8 ec 21 00 00 call 10b7f4 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
109608: 31 c0 xor %eax,%eax
10960a: 8d 65 f8 lea -0x8(%ebp),%esp
10960d: 5b pop %ebx
10960e: 5e pop %esi
10960f: c9 leave
109610: c3 ret
109611: 8d 76 00 lea 0x0(%esi),%esi
rtems_semaphore_delete (tty->isem);
rtems_semaphore_delete (tty->osem);
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
109614: 83 ec 0c sub $0xc,%esp
109617: ff 73 68 pushl 0x68(%ebx)
10961a: e8 35 20 00 00 call 10b654 <rtems_semaphore_delete>
10961f: 83 c4 10 add $0x10,%esp
109622: eb ae jmp 1095d2 <rtems_termios_close+0xce>
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
109624: a3 34 7d 12 00 mov %eax,0x127d34
if ( rtems_termios_ttyHead != NULL ) {
109629: 85 c0 test %eax,%eax
10962b: 0f 84 6b ff ff ff je 10959c <rtems_termios_close+0x98>
rtems_termios_ttyHead->back = NULL;
109631: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
109638: e9 5f ff ff ff jmp 10959c <rtems_termios_close+0x98>
10963d: 8d 76 00 lea 0x0(%esi),%esi
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;
109640: 8b 53 04 mov 0x4(%ebx),%edx
109643: 89 15 30 7d 12 00 mov %edx,0x127d30
if ( rtems_termios_ttyTail != NULL ) {
109649: 85 d2 test %edx,%edx
10964b: 74 d7 je 109624 <rtems_termios_close+0x120>
rtems_termios_ttyTail->forw = NULL;
10964d: c7 02 00 00 00 00 movl $0x0,(%edx)
109653: 8b 03 mov (%ebx),%eax
109655: e9 40 ff ff ff jmp 10959a <rtems_termios_close+0x96>
10965a: 66 90 xchg %ax,%ax
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);
10965c: 50 push %eax
10965d: 6a 00 push $0x0
10965f: 6a 00 push $0x0
109661: ff 73 18 pushl 0x18(%ebx)
109664: e8 8f 20 00 00 call 10b6f8 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
109669: 83 c4 10 add $0x10,%esp
10966c: 85 c0 test %eax,%eax
10966e: 75 56 jne 1096c6 <rtems_termios_close+0x1c2><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
109670: 89 d8 mov %ebx,%eax
109672: e8 75 f9 ff ff call 108fec <drainOutput>
rtems_semaphore_release (tty->osem);
109677: 83 ec 0c sub $0xc,%esp
10967a: ff 73 18 pushl 0x18(%ebx)
10967d: e8 72 21 00 00 call 10b7f4 <rtems_semaphore_release>
109682: 83 c4 10 add $0x10,%esp
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
109685: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
10968c: 0f 85 d6 fe ff ff jne 109568 <rtems_termios_close+0x64>
109692: 66 90 xchg %ax,%ax
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
109694: 83 ec 08 sub $0x8,%esp
109697: 6a 01 push $0x1
109699: ff b3 c4 00 00 00 pushl 0xc4(%ebx)
10969f: e8 40 1b 00 00 call 10b1e4 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
1096a4: 83 c4 10 add $0x10,%esp
1096a7: 85 c0 test %eax,%eax
1096a9: 75 1b jne 1096c6 <rtems_termios_close+0x1c2><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
1096ab: 83 ec 08 sub $0x8,%esp
1096ae: 6a 01 push $0x1
1096b0: ff b3 c8 00 00 00 pushl 0xc8(%ebx)
1096b6: e8 29 1b 00 00 call 10b1e4 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
1096bb: 83 c4 10 add $0x10,%esp
1096be: 85 c0 test %eax,%eax
1096c0: 0f 84 a2 fe ff ff je 109568 <rtems_termios_close+0x64><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
1096c6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1096c9: 50 push %eax <== NOT EXECUTED
1096ca: e8 6d 26 00 00 call 10bd3c <rtems_fatal_error_occurred><== NOT EXECUTED
0010abac <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)
{
10abac: 55 push %ebp
10abad: 89 e5 mov %esp,%ebp
10abaf: 83 ec 08 sub $0x8,%esp
10abb2: 8b 45 08 mov 0x8(%ebp),%eax
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
10abb5: 8b 55 0c mov 0xc(%ebp),%edx
10abb8: 01 90 90 00 00 00 add %edx,0x90(%eax)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10abbe: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
10abc5: 74 2d je 10abf4 <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 ) {
10abc7: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax)
10abce: 74 0c je 10abdc <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);
10abd0: 89 45 08 mov %eax,0x8(%ebp)
}
10abd3: c9 leave
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
10abd4: e9 27 fd ff ff jmp 10a900 <rtems_termios_refill_transmitter>
10abd9: 8d 76 00 lea 0x0(%esi),%esi
if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
10abdc: 8b 15 74 7a 12 00 mov 0x127a74,%edx
10abe2: 85 d2 test %edx,%edx
10abe4: 74 09 je 10abef <rtems_termios_dequeue_characters+0x43><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
10abe6: 83 ec 0c sub $0xc,%esp
10abe9: 50 push %eax
10abea: ff d2 call *%edx
10abec: 83 c4 10 add $0x10,%esp
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
10abef: 31 c0 xor %eax,%eax
10abf1: c9 leave
10abf2: c3 ret
10abf3: 90 nop
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
10abf4: 83 ec 08 sub $0x8,%esp
10abf7: 6a 02 push $0x2
10abf9: ff b0 c8 00 00 00 pushl 0xc8(%eax)
10abff: e8 e0 05 00 00 call 10b1e4 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
10ac04: 83 c4 10 add $0x10,%esp
10ac07: 85 c0 test %eax,%eax
10ac09: 74 e4 je 10abef <rtems_termios_dequeue_characters+0x43><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
10ac0b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ac0e: 50 push %eax <== NOT EXECUTED
10ac0f: e8 28 11 00 00 call 10bd3c <rtems_fatal_error_occurred><== NOT EXECUTED
0010a588 <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)
{
10a588: 55 push %ebp
10a589: 89 e5 mov %esp,%ebp
10a58b: 57 push %edi
10a58c: 56 push %esi
10a58d: 53 push %ebx
10a58e: 83 ec 3c sub $0x3c,%esp
10a591: 8b 5d 08 mov 0x8(%ebp),%ebx
10a594: 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) {
10a597: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10a59d: c1 e0 05 shl $0x5,%eax
10a5a0: 8b 80 d0 79 12 00 mov 0x1279d0(%eax),%eax
10a5a6: 85 c0 test %eax,%eax
10a5a8: 0f 84 8a 00 00 00 je 10a638 <rtems_termios_enqueue_raw_characters+0xb0>
while (len--) {
10a5ae: 8b 4d 10 mov 0x10(%ebp),%ecx
10a5b1: 85 c9 test %ecx,%ecx
10a5b3: 74 2a je 10a5df <rtems_termios_enqueue_raw_characters+0x57><== NEVER TAKEN
10a5b5: 31 ff xor %edi,%edi
10a5b7: eb 12 jmp 10a5cb <rtems_termios_enqueue_raw_characters+0x43>
10a5b9: 8d 76 00 lea 0x0(%esi),%esi
10a5bc: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10a5c2: c1 e0 05 shl $0x5,%eax
10a5c5: 8b 80 d0 79 12 00 mov 0x1279d0(%eax),%eax
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
10a5cb: 83 ec 08 sub $0x8,%esp
10a5ce: 53 push %ebx
10a5cf: 0f be 14 3e movsbl (%esi,%edi,1),%edx
10a5d3: 52 push %edx
10a5d4: ff d0 call *%eax
10a5d6: 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--) {
10a5d7: 83 c4 10 add $0x10,%esp
10a5da: 3b 7d 10 cmp 0x10(%ebp),%edi
10a5dd: 75 dd jne 10a5bc <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 )) {
10a5df: 8b 93 e4 00 00 00 mov 0xe4(%ebx),%edx
10a5e5: 85 d2 test %edx,%edx
10a5e7: 75 3b jne 10a624 <rtems_termios_enqueue_raw_characters+0x9c><== NEVER TAKEN
10a5e9: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
10a5ef: 85 c0 test %eax,%eax
10a5f1: 74 31 je 10a624 <rtems_termios_enqueue_raw_characters+0x9c><== NEVER TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
10a5f3: 83 ec 08 sub $0x8,%esp
10a5f6: ff b3 e0 00 00 00 pushl 0xe0(%ebx)
10a5fc: 8d 53 30 lea 0x30(%ebx),%edx
10a5ff: 52 push %edx
10a600: ff d0 call *%eax
tty->tty_rcvwakeup = 1;
10a602: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx)
10a609: 00 00 00
10a60c: 83 c4 10 add $0x10,%esp
}
return 0;
10a60f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
10a616: 8b 45 e0 mov -0x20(%ebp),%eax
10a619: 8d 65 f4 lea -0xc(%ebp),%esp
10a61c: 5b pop %ebx
10a61d: 5e pop %esi
10a61e: 5f pop %edi
10a61f: c9 leave
10a620: c3 ret
10a621: 8d 76 00 lea 0x0(%esi),%esi
*/
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;
10a624: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
10a62b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10a62e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10a631: 5b pop %ebx <== NOT EXECUTED
10a632: 5e pop %esi <== NOT EXECUTED
10a633: 5f pop %edi <== NOT EXECUTED
10a634: c9 leave <== NOT EXECUTED
10a635: c3 ret <== NOT EXECUTED
10a636: 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) {
10a638: 8b 7d 10 mov 0x10(%ebp),%edi
10a63b: c6 45 db 00 movb $0x0,-0x25(%ebp)
10a63f: 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);
10a646: 8d 43 30 lea 0x30(%ebx),%eax
10a649: 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,
10a64c: 8d 53 4a lea 0x4a(%ebx),%edx
10a64f: 89 55 cc mov %edx,-0x34(%ebp)
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
10a652: 85 ff test %edi,%edi
10a654: 0f 84 0b 01 00 00 je 10a765 <rtems_termios_enqueue_raw_characters+0x1dd><== NEVER TAKEN
10a65a: 66 90 xchg %ax,%ax
c = *buf++;
10a65c: 8a 06 mov (%esi),%al
10a65e: 88 45 e7 mov %al,-0x19(%ebp)
10a661: 46 inc %esi
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
10a662: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a668: f6 c4 02 test $0x2,%ah
10a66b: 74 1c je 10a689 <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]) {
10a66d: 0f be 45 e7 movsbl -0x19(%ebp),%eax
10a671: 0f b6 53 4a movzbl 0x4a(%ebx),%edx
10a675: 39 d0 cmp %edx,%eax
10a677: 0f 84 07 01 00 00 je 10a784 <rtems_termios_enqueue_raw_characters+0x1fc>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
10a67d: 0f b6 53 49 movzbl 0x49(%ebx),%edx
10a681: 39 d0 cmp %edx,%eax
10a683: 0f 84 4f 01 00 00 je 10a7d8 <rtems_termios_enqueue_raw_characters+0x250><== NEVER TAKEN
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
10a689: 80 7d db 00 cmpb $0x0,-0x25(%ebp)
10a68d: 0f 85 0c 01 00 00 jne 10a79f <rtems_termios_enqueue_raw_characters+0x217><== NEVER TAKEN
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
10a693: 8b 43 60 mov 0x60(%ebx),%eax
10a696: 8b 53 64 mov 0x64(%ebx),%edx
10a699: 89 55 dc mov %edx,-0x24(%ebp)
10a69c: 40 inc %eax
10a69d: 31 d2 xor %edx,%edx
10a69f: f7 75 dc divl -0x24(%ebp)
10a6a2: 89 d1 mov %edx,%ecx
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
10a6a4: 9c pushf
10a6a5: fa cli
10a6a6: 8f 45 d4 popl -0x2c(%ebp)
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
10a6a9: 8b 43 5c mov 0x5c(%ebx),%eax
10a6ac: 89 45 c4 mov %eax,-0x3c(%ebp)
10a6af: 8b 43 64 mov 0x64(%ebx),%eax
% tty->rawInBuf.Size) > tty->highwater) &&
10a6b2: 8b 53 64 mov 0x64(%ebx),%edx
10a6b5: 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)
10a6b8: 2b 45 c4 sub -0x3c(%ebp),%eax
10a6bb: 01 c8 add %ecx,%eax
% tty->rawInBuf.Size) > tty->highwater) &&
10a6bd: 31 d2 xor %edx,%edx
10a6bf: 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)
10a6c2: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx
10a6c8: 76 46 jbe 10a710 <rtems_termios_enqueue_raw_characters+0x188><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
10a6ca: 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) &&
10a6d0: a8 01 test $0x1,%al <== NOT EXECUTED
10a6d2: 75 3c jne 10a710 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
10a6d4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a6da: 83 c8 01 or $0x1,%eax <== NOT EXECUTED
10a6dd: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
10a6e3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a6e9: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED
10a6ee: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED
10a6f3: 0f 84 22 01 00 00 je 10a81b <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) ) {
10a6f9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a6ff: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED
10a704: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED
10a709: 0f 84 50 01 00 00 je 10a85f <rtems_termios_enqueue_raw_characters+0x2d7><== NOT EXECUTED
10a70f: 90 nop <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
10a710: ff 75 d4 pushl -0x2c(%ebp)
10a713: 9d popf
if (newTail == tty->rawInBuf.Head) {
10a714: 8b 43 5c mov 0x5c(%ebx),%eax
10a717: 39 c8 cmp %ecx,%eax
10a719: 0f 84 b1 00 00 00 je 10a7d0 <rtems_termios_enqueue_raw_characters+0x248><== NEVER TAKEN
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
10a71f: 8b 43 58 mov 0x58(%ebx),%eax
10a722: 8a 55 e7 mov -0x19(%ebp),%dl
10a725: 88 14 08 mov %dl,(%eax,%ecx,1)
tty->rawInBuf.Tail = newTail;
10a728: 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 )) {
10a72b: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax
10a731: 85 c0 test %eax,%eax
10a733: 75 27 jne 10a75c <rtems_termios_enqueue_raw_characters+0x1d4><== NEVER TAKEN
10a735: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax
10a73b: 85 c0 test %eax,%eax
10a73d: 74 1d je 10a75c <rtems_termios_enqueue_raw_characters+0x1d4><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
10a73f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10a742: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED
10a748: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED
10a74b: ff d0 call *%eax <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
10a74d: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED
10a754: 00 00 00
10a757: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a75a: 66 90 xchg %ax,%ax <== NOT EXECUTED
10a75c: 4f dec %edi
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
10a75d: 85 ff test %edi,%edi
10a75f: 0f 85 f7 fe ff ff jne 10a65c <rtems_termios_enqueue_raw_characters+0xd4><== NEVER TAKEN
}
}
}
}
tty->rawInBufDropped += dropped;
10a765: 8b 45 e0 mov -0x20(%ebp),%eax
10a768: 01 43 78 add %eax,0x78(%ebx)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
10a76b: 83 ec 0c sub $0xc,%esp
10a76e: ff 73 68 pushl 0x68(%ebx)
10a771: e8 7e 10 00 00 call 10b7f4 <rtems_semaphore_release>
return dropped;
10a776: 83 c4 10 add $0x10,%esp
}
10a779: 8b 45 e0 mov -0x20(%ebp),%eax
10a77c: 8d 65 f4 lea -0xc(%ebp),%esp
10a77f: 5b pop %ebx
10a780: 5e pop %esi
10a781: 5f pop %edi
10a782: c9 leave
10a783: 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]) {
10a784: 0f b6 53 49 movzbl 0x49(%ebx),%edx
10a788: 39 d0 cmp %edx,%eax
10a78a: 74 7e je 10a80a <rtems_termios_enqueue_raw_characters+0x282><== NEVER TAKEN
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
10a78c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a792: 83 c8 10 or $0x10,%eax
10a795: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx)
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--) {
10a79b: c6 45 db 01 movb $0x1,-0x25(%ebp)
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
10a79f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a7a5: 83 e0 30 and $0x30,%eax
10a7a8: 83 f8 20 cmp $0x20,%eax
10a7ab: 75 af jne 10a75c <rtems_termios_enqueue_raw_characters+0x1d4><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
10a7ad: 9c pushf <== NOT EXECUTED
10a7ae: fa cli <== NOT EXECUTED
10a7af: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
10a7b0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a7b6: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
10a7b9: 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) {
10a7bf: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED
10a7c5: 85 c0 test %eax,%eax <== NOT EXECUTED
10a7c7: 75 20 jne 10a7e9 <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);
10a7c9: 52 push %edx <== NOT EXECUTED
10a7ca: 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;
10a7cb: 4f dec %edi <== NOT EXECUTED
10a7cc: eb 8f jmp 10a75d <rtems_termios_enqueue_raw_characters+0x1d5><== NOT EXECUTED
10a7ce: 66 90 xchg %ax,%ax <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
10a7d0: 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;
10a7d3: 4f dec %edi <== NOT EXECUTED
10a7d4: eb 87 jmp 10a75d <rtems_termios_enqueue_raw_characters+0x1d5><== NOT EXECUTED
10a7d6: 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;
10a7d8: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a7de: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED
10a7e1: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
10a7e7: eb b2 jmp 10a79b <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);
10a7e9: 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)(
10a7ef: 51 push %ecx <== NOT EXECUTED
10a7f0: 6a 01 push $0x1 <== NOT EXECUTED
10a7f2: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED
10a7f5: 50 push %eax <== NOT EXECUTED
10a7f6: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a7f9: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED
10a7fc: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10a802: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a805: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED
10a808: eb bf jmp 10a7c9 <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;
10a80a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a810: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED
10a813: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
10a819: eb 80 jmp 10a79b <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) ||
10a81b: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a821: a8 20 test $0x20,%al <== NOT EXECUTED
10a823: 75 0e jne 10a833 <rtems_termios_enqueue_raw_characters+0x2ab><== NOT EXECUTED
10a825: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED
10a82b: 85 c0 test %eax,%eax <== NOT EXECUTED
10a82d: 0f 85 dd fe ff ff jne 10a710 <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;
10a833: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a839: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
10a83c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
10a842: 52 push %edx <== NOT EXECUTED
10a843: 6a 01 push $0x1 <== NOT EXECUTED
10a845: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED
10a848: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a84b: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED
10a84e: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10a854: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a857: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
10a85a: e9 b1 fe ff ff jmp 10a710 <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;
10a85f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a865: 83 c8 04 or $0x4,%eax <== NOT EXECUTED
10a868: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
10a86e: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED
10a874: 85 c0 test %eax,%eax <== NOT EXECUTED
10a876: 0f 84 94 fe ff ff je 10a710 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
10a87c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a87f: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a882: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED
10a885: ff d0 call *%eax <== NOT EXECUTED
10a887: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a88a: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED
10a88d: e9 7e fe ff ff jmp 10a710 <rtems_termios_enqueue_raw_characters+0x188><== NOT EXECUTED
00108fb0 <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
108fb0: 55 push %ebp
108fb1: 89 e5 mov %esp,%ebp
108fb3: 83 ec 08 sub $0x8,%esp
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
108fb6: a1 2c 7d 12 00 mov 0x127d2c,%eax
108fbb: 85 c0 test %eax,%eax
108fbd: 74 05 je 108fc4 <rtems_termios_initialize+0x14>
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
108fbf: c9 leave
108fc0: c3 ret
108fc1: 8d 76 00 lea 0x0(%esi),%esi
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
sc = rtems_semaphore_create (
108fc4: 83 ec 0c sub $0xc,%esp
108fc7: 68 2c 7d 12 00 push $0x127d2c
108fcc: 6a 00 push $0x0
108fce: 6a 54 push $0x54
108fd0: 6a 01 push $0x1
108fd2: 68 69 6d 52 54 push $0x54526d69
108fd7: e8 a0 24 00 00 call 10b47c <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)
108fdc: 83 c4 20 add $0x20,%esp
108fdf: 85 c0 test %eax,%eax
108fe1: 74 dc je 108fbf <rtems_termios_initialize+0xf>
rtems_fatal_error_occurred (sc);
108fe3: 83 ec 0c sub $0xc,%esp
108fe6: 50 push %eax
108fe7: e8 50 2d 00 00 call 10bd3c <rtems_fatal_error_occurred>
001096f0 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
1096f0: 55 push %ebp
1096f1: 89 e5 mov %esp,%ebp
1096f3: 57 push %edi
1096f4: 56 push %esi
1096f5: 53 push %ebx
1096f6: 83 ec 20 sub $0x20,%esp
1096f9: 8b 5d 08 mov 0x8(%ebp),%ebx
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
1096fc: 8b 03 mov (%ebx),%eax
1096fe: 8b 40 34 mov 0x34(%eax),%eax
109701: 89 45 e4 mov %eax,-0x1c(%ebp)
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
109704: 8b 73 08 mov 0x8(%ebx),%esi
rtems_status_code sc;
args->ioctl_return = 0;
109707: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10970e: 6a 00 push $0x0
109710: 6a 00 push $0x0
109712: ff 70 18 pushl 0x18(%eax)
109715: e8 de 1f 00 00 call 10b6f8 <rtems_semaphore_obtain>
10971a: 89 45 e0 mov %eax,-0x20(%ebp)
if (sc != RTEMS_SUCCESSFUL) {
10971d: 83 c4 10 add $0x10,%esp
109720: 85 c0 test %eax,%eax
109722: 75 24 jne 109748 <rtems_termios_ioctl+0x58><== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
109724: 8b 43 04 mov 0x4(%ebx),%eax
109727: 83 f8 04 cmp $0x4,%eax
10972a: 74 70 je 10979c <rtems_termios_ioctl+0xac>
10972c: 77 2a ja 109758 <rtems_termios_ioctl+0x68>
10972e: 83 f8 02 cmp $0x2,%eax
109731: 0f 84 9d 00 00 00 je 1097d4 <rtems_termios_ioctl+0xe4>
109737: 0f 86 3f 02 00 00 jbe 10997c <rtems_termios_ioctl+0x28c>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
10973d: 8b 45 e4 mov -0x1c(%ebp),%eax
109740: e8 a7 f8 ff ff call 108fec <drainOutput>
break;
109745: eb 69 jmp 1097b0 <rtems_termios_ioctl+0xc0>
109747: 90 nop
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;
109748: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED
}
rtems_semaphore_release (tty->osem);
args->ioctl_return = sc;
return sc;
}
10974b: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED
10974e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
109751: 5b pop %ebx <== NOT EXECUTED
109752: 5e pop %esi <== NOT EXECUTED
109753: 5f pop %edi <== NOT EXECUTED
109754: c9 leave <== NOT EXECUTED
109755: c3 ret <== NOT EXECUTED
109756: 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) {
109758: 3d 7f 66 04 40 cmp $0x4004667f,%eax
10975d: 0f 84 f1 01 00 00 je 109954 <rtems_termios_ioctl+0x264><== NEVER TAKEN
109763: 0f 87 33 02 00 00 ja 10999c <rtems_termios_ioctl+0x2ac>
109769: 83 f8 05 cmp $0x5,%eax
10976c: 0f 84 ae 02 00 00 je 109a20 <rtems_termios_ioctl+0x330>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
109772: 8b 55 e4 mov -0x1c(%ebp),%edx
109775: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax
10977b: c1 e0 05 shl $0x5,%eax
10977e: 8b 80 d8 79 12 00 mov 0x1279d8(%eax),%eax
109784: 85 c0 test %eax,%eax
109786: 0f 84 b8 02 00 00 je 109a44 <rtems_termios_ioctl+0x354><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
10978c: 83 ec 08 sub $0x8,%esp
10978f: 53 push %ebx
109790: 52 push %edx
109791: ff d0 call *%eax
109793: 89 45 e0 mov %eax,-0x20(%ebp)
109796: 83 c4 10 add $0x10,%esp
109799: eb 15 jmp 1097b0 <rtems_termios_ioctl+0xc0>
10979b: 90 nop
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
10979c: 8b 06 mov (%esi),%eax
10979e: 8b 56 04 mov 0x4(%esi),%edx
1097a1: 8b 4d e4 mov -0x1c(%ebp),%ecx
1097a4: 89 81 dc 00 00 00 mov %eax,0xdc(%ecx)
1097aa: 89 91 e0 00 00 00 mov %edx,0xe0(%ecx)
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
1097b0: 83 ec 0c sub $0xc,%esp
1097b3: 8b 45 e4 mov -0x1c(%ebp),%eax
1097b6: ff 70 18 pushl 0x18(%eax)
1097b9: e8 36 20 00 00 call 10b7f4 <rtems_semaphore_release>
args->ioctl_return = sc;
1097be: 8b 55 e0 mov -0x20(%ebp),%edx
1097c1: 89 53 0c mov %edx,0xc(%ebx)
return sc;
1097c4: 83 c4 10 add $0x10,%esp
}
1097c7: 8b 45 e0 mov -0x20(%ebp),%eax
1097ca: 8d 65 f4 lea -0xc(%ebp),%esp
1097cd: 5b pop %ebx
1097ce: 5e pop %esi
1097cf: 5f pop %edi
1097d0: c9 leave
1097d1: c3 ret
1097d2: 66 90 xchg %ax,%ax
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
1097d4: 8b 73 08 mov 0x8(%ebx),%esi
1097d7: 8b 4d e4 mov -0x1c(%ebp),%ecx
1097da: 83 c1 30 add $0x30,%ecx
1097dd: 89 4d dc mov %ecx,-0x24(%ebp)
1097e0: b9 09 00 00 00 mov $0x9,%ecx
1097e5: 8b 7d dc mov -0x24(%ebp),%edi
1097e8: 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) &&
1097ea: 8b 55 e4 mov -0x1c(%ebp),%edx
1097ed: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
1097f3: f6 c4 02 test $0x2,%ah
1097f6: 74 44 je 10983c <rtems_termios_ioctl+0x14c>
1097f8: f6 42 31 04 testb $0x4,0x31(%edx)
1097fc: 75 3e jne 10983c <rtems_termios_ioctl+0x14c>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
1097fe: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
109804: 25 ef fd ff ff and $0xfffffdef,%eax
109809: 89 82 b8 00 00 00 mov %eax,0xb8(%edx)
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
10980f: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
109815: a8 20 test $0x20,%al
109817: 74 23 je 10983c <rtems_termios_ioctl+0x14c><== ALWAYS TAKEN
/* disable interrupts */
rtems_interrupt_disable(level);
109819: 9c pushf <== NOT EXECUTED
10981a: fa cli <== NOT EXECUTED
10981b: 5e pop %esi <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
10981c: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
109822: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED
109825: 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) {
10982b: 8b ba 94 00 00 00 mov 0x94(%edx),%edi <== NOT EXECUTED
109831: 85 ff test %edi,%edi <== NOT EXECUTED
109833: 0f 85 bb 02 00 00 jne 109af4 <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);
109839: 56 push %esi <== NOT EXECUTED
10983a: 9d popf <== NOT EXECUTED
10983b: 90 nop <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
10983c: 8b 4d e4 mov -0x1c(%ebp),%ecx
10983f: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax
109845: f6 c4 04 test $0x4,%ah
109848: 74 24 je 10986e <rtems_termios_ioctl+0x17e>
10984a: f6 41 31 10 testb $0x10,0x31(%ecx)
10984e: 75 1e jne 10986e <rtems_termios_ioctl+0x17e><== NEVER TAKEN
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
109850: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax
109856: 80 e4 fb and $0xfb,%ah
109859: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx)
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
10985f: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax
109865: 83 e0 fd and $0xfffffffd,%eax
109868: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx)
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
10986e: 8b 55 e4 mov -0x1c(%ebp),%edx
109871: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
109877: f6 c4 01 test $0x1,%ah
10987a: 0f 84 bc 01 00 00 je 109a3c <rtems_termios_ioctl+0x34c><== ALWAYS TAKEN
109880: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
109883: 8b 41 38 mov 0x38(%ecx),%eax <== NOT EXECUTED
109886: 85 c0 test %eax,%eax <== NOT EXECUTED
109888: 0f 88 12 02 00 00 js 109aa0 <rtems_termios_ioctl+0x3b0><== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
10988e: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED
109894: 80 e6 fe and $0xfe,%dh <== NOT EXECUTED
109897: 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)) {
10989d: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED
1098a3: 83 e2 04 and $0x4,%edx <== NOT EXECUTED
1098a6: 74 1b je 1098c3 <rtems_termios_ioctl+0x1d3><== NOT EXECUTED
1098a8: 8b 91 b0 00 00 00 mov 0xb0(%ecx),%edx <== NOT EXECUTED
1098ae: 85 d2 test %edx,%edx <== NOT EXECUTED
1098b0: 74 11 je 1098c3 <rtems_termios_ioctl+0x1d3><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
1098b2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
1098b5: ff 71 10 pushl 0x10(%ecx) <== NOT EXECUTED
1098b8: ff d2 call *%edx <== NOT EXECUTED
1098ba: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
1098bd: 8b 42 38 mov 0x38(%edx),%eax <== NOT EXECUTED
1098c0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
1098c3: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
1098c6: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED
1098cc: 83 e2 fb and $0xfffffffb,%edx <== NOT EXECUTED
1098cf: 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) {
1098d5: 85 c0 test %eax,%eax
1098d7: 0f 88 c3 01 00 00 js 109aa0 <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) {
1098dd: 8b 4d e4 mov -0x1c(%ebp),%ecx
1098e0: 8b 41 30 mov 0x30(%ecx),%eax
1098e3: f6 c4 10 test $0x10,%ah
1098e6: 74 0f je 1098f7 <rtems_termios_ioctl+0x207>
tty->flow_ctrl |= FL_MDXOF;
1098e8: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx
1098ee: 80 ce 04 or $0x4,%dh
1098f1: 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) {
1098f7: f6 c4 04 test $0x4,%ah
1098fa: 74 12 je 10990e <rtems_termios_ioctl+0x21e>
tty->flow_ctrl |= FL_MDXON;
1098fc: 8b 55 e4 mov -0x1c(%ebp),%edx
1098ff: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax
109905: 80 cc 02 or $0x2,%ah
109908: 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) {
10990e: 8b 4d e4 mov -0x1c(%ebp),%ecx
109911: f6 41 3c 02 testb $0x2,0x3c(%ecx)
109915: 0f 84 41 01 00 00 je 109a5c <rtems_termios_ioctl+0x36c>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
10991b: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
109922: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
109929: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx)
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
109930: 8b 55 e4 mov -0x1c(%ebp),%edx
109933: 8b 82 a8 00 00 00 mov 0xa8(%edx),%eax
109939: 85 c0 test %eax,%eax
10993b: 0f 84 6f fe ff ff je 1097b0 <rtems_termios_ioctl+0xc0><== NEVER TAKEN
(*tty->device.setAttributes)(tty->minor, &tty->termios);
109941: 83 ec 08 sub $0x8,%esp
109944: ff 75 dc pushl -0x24(%ebp)
109947: ff 72 10 pushl 0x10(%edx)
10994a: ff d0 call *%eax
10994c: 83 c4 10 add $0x10,%esp
10994f: e9 5c fe ff ff jmp 1097b0 <rtems_termios_ioctl+0xc0>
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
109954: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
109957: 8b 42 60 mov 0x60(%edx),%eax <== NOT EXECUTED
10995a: 89 d1 mov %edx,%ecx <== NOT EXECUTED
10995c: 8b 52 5c mov 0x5c(%edx),%edx <== NOT EXECUTED
if ( rawnc < 0 )
10995f: 29 d0 sub %edx,%eax <== NOT EXECUTED
109961: 0f 88 e9 00 00 00 js 109a50 <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;
109967: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED
10996a: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED
10996d: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED
109970: 2b 41 24 sub 0x24(%ecx),%eax <== NOT EXECUTED
109973: 89 02 mov %eax,(%edx) <== NOT EXECUTED
}
break;
109975: e9 36 fe ff ff jmp 1097b0 <rtems_termios_ioctl+0xc0><== NOT EXECUTED
10997a: 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) {
10997c: 48 dec %eax
10997d: 0f 85 ef fd ff ff jne 109772 <rtems_termios_ioctl+0x82><== NEVER TAKEN
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
109983: 8b 43 08 mov 0x8(%ebx),%eax
109986: 8b 75 e4 mov -0x1c(%ebp),%esi
109989: 83 c6 30 add $0x30,%esi
10998c: b9 09 00 00 00 mov $0x9,%ecx
109991: 89 c7 mov %eax,%edi
109993: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
break;
109995: e9 16 fe ff ff jmp 1097b0 <rtems_termios_ioctl+0xc0>
10999a: 66 90 xchg %ax,%ax
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
10999c: 3d 1a 74 04 40 cmp $0x4004741a,%eax
1099a1: 74 69 je 109a0c <rtems_termios_ioctl+0x31c>
1099a3: 3d 1b 74 04 80 cmp $0x8004741b,%eax
1099a8: 0f 85 c4 fd ff ff jne 109772 <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) {
1099ae: 8b 55 e4 mov -0x1c(%ebp),%edx
1099b1: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax
1099b7: c1 e0 05 shl $0x5,%eax
1099ba: 8b 80 c4 79 12 00 mov 0x1279c4(%eax),%eax
1099c0: 85 c0 test %eax,%eax
1099c2: 74 0c je 1099d0 <rtems_termios_ioctl+0x2e0>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
1099c4: 83 ec 0c sub $0xc,%esp
1099c7: 52 push %edx
1099c8: ff d0 call *%eax
1099ca: 89 45 e0 mov %eax,-0x20(%ebp)
1099cd: 83 c4 10 add $0x10,%esp
}
tty->t_line=*(int*)(args->buffer);
1099d0: 8b 43 08 mov 0x8(%ebx),%eax
1099d3: 8b 00 mov (%eax),%eax
1099d5: 8b 4d e4 mov -0x1c(%ebp),%ecx
1099d8: 89 81 cc 00 00 00 mov %eax,0xcc(%ecx)
tty->t_sc = NULL; /* ensure that no more valid data */
1099de: c7 81 d0 00 00 00 00 movl $0x0,0xd0(%ecx)
1099e5: 00 00 00
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
1099e8: c1 e0 05 shl $0x5,%eax
1099eb: 8b 80 c0 79 12 00 mov 0x1279c0(%eax),%eax
1099f1: 85 c0 test %eax,%eax
1099f3: 0f 84 b7 fd ff ff je 1097b0 <rtems_termios_ioctl+0xc0><== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
1099f9: 83 ec 0c sub $0xc,%esp
1099fc: 51 push %ecx
1099fd: ff d0 call *%eax
1099ff: 89 45 e0 mov %eax,-0x20(%ebp)
109a02: 83 c4 10 add $0x10,%esp
109a05: e9 a6 fd ff ff jmp 1097b0 <rtems_termios_ioctl+0xc0>
109a0a: 66 90 xchg %ax,%ax
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
109a0c: 8b 43 08 mov 0x8(%ebx),%eax
109a0f: 8b 4d e4 mov -0x1c(%ebp),%ecx
109a12: 8b 91 cc 00 00 00 mov 0xcc(%ecx),%edx
109a18: 89 10 mov %edx,(%eax)
break;
109a1a: e9 91 fd ff ff jmp 1097b0 <rtems_termios_ioctl+0xc0>
109a1f: 90 nop
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
109a20: 8b 06 mov (%esi),%eax
109a22: 8b 56 04 mov 0x4(%esi),%edx
109a25: 8b 4d e4 mov -0x1c(%ebp),%ecx
109a28: 89 81 d4 00 00 00 mov %eax,0xd4(%ecx)
109a2e: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx)
break;
109a34: e9 77 fd ff ff jmp 1097b0 <rtems_termios_ioctl+0xc0>
109a39: 8d 76 00 lea 0x0(%esi),%esi
/* 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)) {
109a3c: 8b 42 38 mov 0x38(%edx),%eax
109a3f: e9 91 fe ff ff jmp 1098d5 <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;
109a44: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) <== NOT EXECUTED
109a4b: e9 60 fd ff ff jmp 1097b0 <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;
109a50: 8b 51 64 mov 0x64(%ecx),%edx <== NOT EXECUTED
109a53: 01 d0 add %edx,%eax <== NOT EXECUTED
109a55: e9 0d ff ff ff jmp 109967 <rtems_termios_ioctl+0x277><== NOT EXECUTED
109a5a: 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] *
109a5c: 8b 45 e4 mov -0x1c(%ebp),%eax
109a5f: 0f b6 70 46 movzbl 0x46(%eax),%esi
rtems_clock_get_ticks_per_second() / 10;
109a63: e8 74 15 00 00 call 10afdc <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] *
109a68: 0f af c6 imul %esi,%eax
rtems_clock_get_ticks_per_second() / 10;
109a6b: ba cd cc cc cc mov $0xcccccccd,%edx
109a70: f7 e2 mul %edx
109a72: 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] *
109a75: 8b 4d e4 mov -0x1c(%ebp),%ecx
109a78: 89 51 54 mov %edx,0x54(%ecx)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
109a7b: 80 79 46 00 cmpb $0x0,0x46(%ecx)
109a7f: 74 36 je 109ab7 <rtems_termios_ioctl+0x3c7>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
109a81: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx)
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
109a88: 89 51 70 mov %edx,0x70(%ecx)
if (tty->termios.c_cc[VMIN])
109a8b: 80 79 47 00 cmpb $0x0,0x47(%ecx)
109a8f: 74 49 je 109ada <rtems_termios_ioctl+0x3ea>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
109a91: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx)
109a98: e9 93 fe ff ff jmp 109930 <rtems_termios_ioctl+0x240>
109a9d: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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;
109aa0: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED
109aa3: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED
109aa9: 80 cc 01 or $0x1,%ah <== NOT EXECUTED
109aac: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED
109ab2: e9 26 fe ff ff jmp 1098dd <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]) {
109ab7: 8b 55 e4 mov -0x1c(%ebp),%edx
109aba: 80 7a 47 00 cmpb $0x0,0x47(%edx)
109abe: 74 25 je 109ae5 <rtems_termios_ioctl+0x3f5><== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
109ac0: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
109ac7: c7 42 70 00 00 00 00 movl $0x0,0x70(%edx) <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
109ace: c7 42 74 00 00 00 00 movl $0x0,0x74(%edx) <== NOT EXECUTED
109ad5: e9 56 fe ff ff jmp 109930 <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;
109ada: 8b 45 e4 mov -0x1c(%ebp),%eax
109add: 89 50 74 mov %edx,0x74(%eax)
109ae0: e9 4b fe ff ff jmp 109930 <rtems_termios_ioctl+0x240>
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;
109ae5: 8b 4d e4 mov -0x1c(%ebp),%ecx
109ae8: c7 41 6c 01 00 00 00 movl $0x1,0x6c(%ecx)
109aef: e9 3c fe ff ff jmp 109930 <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);
109af4: 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)(
109afa: 51 push %ecx <== NOT EXECUTED
109afb: 6a 01 push $0x1 <== NOT EXECUTED
109afd: 03 42 7c add 0x7c(%edx),%eax <== NOT EXECUTED
109b00: 50 push %eax <== NOT EXECUTED
109b01: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED
109b04: ff 92 a4 00 00 00 call *0xa4(%edx) <== NOT EXECUTED
109b0a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
109b0d: e9 27 fd ff ff jmp 109839 <rtems_termios_ioctl+0x149><== NOT EXECUTED
0010aacc <rtems_termios_number_to_baud>:
extern rtems_assoc_t termios_assoc_table[];
int rtems_termios_number_to_baud(
int32_t baud
)
{
10aacc: 55 push %ebp
10aacd: 89 e5 mov %esp,%ebp
10aacf: 53 push %ebx
10aad0: 83 ec 0c sub $0xc,%esp
10aad3: 8b 5d 08 mov 0x8(%ebp),%ebx
int termios_baud;
termios_baud = rtems_assoc_remote_by_local( termios_assoc_table, baud );
10aad6: 53 push %ebx
10aad7: 68 20 92 12 00 push $0x129220
10aadc: e8 3f 6f 00 00 call 111a20 <rtems_assoc_remote_by_local>
if ( termios_baud == 0 && baud != 0 )
10aae1: 83 c4 10 add $0x10,%esp
10aae4: 85 c0 test %eax,%eax
10aae6: 74 08 je 10aaf0 <rtems_termios_number_to_baud+0x24>
return -1;
return termios_baud;
}
10aae8: 8b 5d fc mov -0x4(%ebp),%ebx
10aaeb: c9 leave
10aaec: c3 ret
10aaed: 8d 76 00 lea 0x0(%esi),%esi
)
{
int termios_baud;
termios_baud = rtems_assoc_remote_by_local( termios_assoc_table, baud );
if ( termios_baud == 0 && baud != 0 )
10aaf0: 85 db test %ebx,%ebx
10aaf2: 74 f4 je 10aae8 <rtems_termios_number_to_baud+0x1c>
return -1;
10aaf4: b8 ff ff ff ff mov $0xffffffff,%eax
10aaf9: eb ed jmp 10aae8 <rtems_termios_number_to_baud+0x1c>
0010905c <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
10905c: 55 push %ebp
10905d: 89 e5 mov %esp,%ebp
10905f: 57 push %edi
109060: 56 push %esi
109061: 53 push %ebx
109062: 83 ec 40 sub $0x40,%esp
109065: 8b 55 08 mov 0x8(%ebp),%edx
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
109068: 6a 00 push $0x0
10906a: 6a 00 push $0x0
10906c: ff 35 2c 7d 12 00 pushl 0x127d2c
109072: 89 55 dc mov %edx,-0x24(%ebp)
109075: e8 7e 26 00 00 call 10b6f8 <rtems_semaphore_obtain>
10907a: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
10907d: 83 c4 10 add $0x10,%esp
109080: 85 c0 test %eax,%eax
109082: 8b 55 dc mov -0x24(%ebp),%edx
109085: 75 6d jne 1090f4 <rtems_termios_open+0x98><== NEVER TAKEN
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
109087: 8b 35 34 7d 12 00 mov 0x127d34,%esi
10908d: 85 f6 test %esi,%esi
10908f: 0f 84 a7 00 00 00 je 10913c <rtems_termios_open+0xe0>
109095: 89 f3 mov %esi,%ebx
109097: 8b 45 0c mov 0xc(%ebp),%eax
10909a: eb 0a jmp 1090a6 <rtems_termios_open+0x4a>
10909c: 8b 1b mov (%ebx),%ebx
10909e: 85 db test %ebx,%ebx
1090a0: 0f 84 96 00 00 00 je 10913c <rtems_termios_open+0xe0><== ALWAYS TAKEN
if ((tty->major == major) && (tty->minor == minor))
1090a6: 39 53 0c cmp %edx,0xc(%ebx)
1090a9: 75 f1 jne 10909c <rtems_termios_open+0x40>
1090ab: 39 43 10 cmp %eax,0x10(%ebx)
1090ae: 75 ec jne 10909c <rtems_termios_open+0x40><== NEVER TAKEN
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
1090b0: 8b 75 10 mov 0x10(%ebp),%esi
1090b3: 8b 06 mov (%esi),%eax
1090b5: 89 58 34 mov %ebx,0x34(%eax)
if (!tty->refcount++) {
1090b8: 8b 43 08 mov 0x8(%ebx),%eax
1090bb: 8d 48 01 lea 0x1(%eax),%ecx
1090be: 89 4b 08 mov %ecx,0x8(%ebx)
1090c1: 85 c0 test %eax,%eax
1090c3: 75 1e jne 1090e3 <rtems_termios_open+0x87>
if (tty->device.firstOpen)
1090c5: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax
1090cb: 85 c0 test %eax,%eax
1090cd: 74 0b je 1090da <rtems_termios_open+0x7e>
(*tty->device.firstOpen)(major, minor, arg);
1090cf: 57 push %edi
1090d0: 56 push %esi
1090d1: ff 75 0c pushl 0xc(%ebp)
1090d4: 52 push %edx
1090d5: ff d0 call *%eax
1090d7: 83 c4 10 add $0x10,%esp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
1090da: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx)
1090e1: 74 1c je 1090ff <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);
1090e3: 83 ec 0c sub $0xc,%esp
1090e6: ff 35 2c 7d 12 00 pushl 0x127d2c
1090ec: e8 03 27 00 00 call 10b7f4 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
1090f1: 83 c4 10 add $0x10,%esp
}
1090f4: 8b 45 e4 mov -0x1c(%ebp),%eax
1090f7: 8d 65 f4 lea -0xc(%ebp),%esp
1090fa: 5b pop %ebx
1090fb: 5e pop %esi
1090fc: 5f pop %edi
1090fd: c9 leave
1090fe: c3 ret
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
1090ff: 56 push %esi
109100: 53 push %ebx
109101: 68 94 a8 10 00 push $0x10a894
109106: ff b3 c4 00 00 00 pushl 0xc4(%ebx)
10910c: e8 2b 2a 00 00 call 10bb3c <rtems_task_start>
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
109111: 83 c4 10 add $0x10,%esp
109114: 85 c0 test %eax,%eax
109116: 0f 85 3f 03 00 00 jne 10945b <rtems_termios_open+0x3ff><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
10911c: 51 push %ecx
10911d: 53 push %ebx
10911e: 68 44 ab 10 00 push $0x10ab44
109123: ff b3 c8 00 00 00 pushl 0xc8(%ebx)
109129: e8 0e 2a 00 00 call 10bb3c <rtems_task_start>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
10912e: 83 c4 10 add $0x10,%esp
109131: 85 c0 test %eax,%eax
109133: 74 ae je 1090e3 <rtems_termios_open+0x87><== ALWAYS TAKEN
109135: e9 21 03 00 00 jmp 10945b <rtems_termios_open+0x3ff><== NOT EXECUTED
10913a: 66 90 xchg %ax,%ax <== NOT EXECUTED
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
10913c: 83 ec 08 sub $0x8,%esp
10913f: 68 e8 00 00 00 push $0xe8
109144: 6a 01 push $0x1
109146: 89 55 dc mov %edx,-0x24(%ebp)
109149: e8 f6 ed ff ff call 107f44 <calloc>
10914e: 89 45 e0 mov %eax,-0x20(%ebp)
109151: 89 c3 mov %eax,%ebx
if (tty == NULL) {
109153: 83 c4 10 add $0x10,%esp
109156: 85 c0 test %eax,%eax
109158: 8b 55 dc mov -0x24(%ebp),%edx
10915b: 0f 84 75 02 00 00 je 1093d6 <rtems_termios_open+0x37a>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
109161: a1 44 5a 12 00 mov 0x125a44,%eax
109166: 8b 4d e0 mov -0x20(%ebp),%ecx
109169: 89 41 64 mov %eax,0x64(%ecx)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
10916c: 8b 41 64 mov 0x64(%ecx),%eax
10916f: 83 ec 0c sub $0xc,%esp
109172: 50 push %eax
109173: 89 55 dc mov %edx,-0x24(%ebp)
109176: e8 2d f2 ff ff call 1083a8 <malloc>
10917b: 89 45 c4 mov %eax,-0x3c(%ebp)
10917e: 8b 7d e0 mov -0x20(%ebp),%edi
109181: 89 47 58 mov %eax,0x58(%edi)
if (tty->rawInBuf.theBuf == NULL) {
109184: 83 c4 10 add $0x10,%esp
109187: 85 c0 test %eax,%eax
109189: 8b 55 dc mov -0x24(%ebp),%edx
10918c: 0f 84 61 02 00 00 je 1093f3 <rtems_termios_open+0x397>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
109192: a1 48 5a 12 00 mov 0x125a48,%eax
109197: 8b 4d e0 mov -0x20(%ebp),%ecx
10919a: 89 81 88 00 00 00 mov %eax,0x88(%ecx)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
1091a0: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax
1091a6: 83 ec 0c sub $0xc,%esp
1091a9: 50 push %eax
1091aa: 89 55 dc mov %edx,-0x24(%ebp)
1091ad: e8 f6 f1 ff ff call 1083a8 <malloc>
1091b2: 89 c7 mov %eax,%edi
1091b4: 8b 45 e0 mov -0x20(%ebp),%eax
1091b7: 89 78 7c mov %edi,0x7c(%eax)
if (tty->rawOutBuf.theBuf == NULL) {
1091ba: 83 c4 10 add $0x10,%esp
1091bd: 85 ff test %edi,%edi
1091bf: 8b 55 dc mov -0x24(%ebp),%edx
1091c2: 0f 84 4f 02 00 00 je 109417 <rtems_termios_open+0x3bb><== NEVER TAKEN
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
1091c8: 83 ec 0c sub $0xc,%esp
1091cb: ff 35 40 5a 12 00 pushl 0x125a40
1091d1: 89 55 dc mov %edx,-0x24(%ebp)
1091d4: e8 cf f1 ff ff call 1083a8 <malloc>
1091d9: 8b 4d e0 mov -0x20(%ebp),%ecx
1091dc: 89 41 1c mov %eax,0x1c(%ecx)
if (tty->cbuf == NULL) {
1091df: 83 c4 10 add $0x10,%esp
1091e2: 85 c0 test %eax,%eax
1091e4: 8b 55 dc mov -0x24(%ebp),%edx
1091e7: 0f 84 77 02 00 00 je 109464 <rtems_termios_open+0x408>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
1091ed: 8b 7d e0 mov -0x20(%ebp),%edi
1091f0: c7 87 d4 00 00 00 00 movl $0x0,0xd4(%edi)
1091f7: 00 00 00
tty->tty_snd.sw_arg = NULL;
1091fa: c7 87 d8 00 00 00 00 movl $0x0,0xd8(%edi)
109201: 00 00 00
tty->tty_rcv.sw_pfn = NULL;
109204: c7 87 dc 00 00 00 00 movl $0x0,0xdc(%edi)
10920b: 00 00 00
tty->tty_rcv.sw_arg = NULL;
10920e: c7 87 e0 00 00 00 00 movl $0x0,0xe0(%edi)
109215: 00 00 00
tty->tty_rcvwakeup = 0;
109218: c7 87 e4 00 00 00 00 movl $0x0,0xe4(%edi)
10921f: 00 00 00
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
109222: 89 37 mov %esi,(%edi)
tty->back = NULL;
109224: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi)
if (rtems_termios_ttyHead != NULL)
10922b: 85 f6 test %esi,%esi
10922d: 74 03 je 109232 <rtems_termios_open+0x1d6>
rtems_termios_ttyHead->back = tty;
10922f: 89 7e 04 mov %edi,0x4(%esi)
rtems_termios_ttyHead = tty;
109232: 8b 45 e0 mov -0x20(%ebp),%eax
109235: a3 34 7d 12 00 mov %eax,0x127d34
if (rtems_termios_ttyTail == NULL)
10923a: 8b 0d 30 7d 12 00 mov 0x127d30,%ecx
109240: 85 c9 test %ecx,%ecx
109242: 0f 84 af 02 00 00 je 1094f7 <rtems_termios_open+0x49b>
rtems_termios_ttyTail = tty;
tty->minor = minor;
109248: 8b 75 0c mov 0xc(%ebp),%esi
10924b: 8b 4d e0 mov -0x20(%ebp),%ecx
10924e: 89 71 10 mov %esi,0x10(%ecx)
tty->major = major;
109251: 89 51 0c mov %edx,0xc(%ecx)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
109254: 83 ec 0c sub $0xc,%esp
109257: 89 c8 mov %ecx,%eax
109259: 83 c0 14 add $0x14,%eax
10925c: 50 push %eax
10925d: 6a 00 push $0x0
10925f: 6a 54 push $0x54
109261: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'i', c),
109263: 0f be 05 4c 5a 12 00 movsbl 0x125a4c,%eax
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
10926a: 0d 00 69 52 54 or $0x54526900,%eax
10926f: 50 push %eax
109270: 89 55 dc mov %edx,-0x24(%ebp)
109273: e8 04 22 00 00 call 10b47c <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)
109278: 83 c4 20 add $0x20,%esp
10927b: 85 c0 test %eax,%eax
10927d: 8b 55 dc mov -0x24(%ebp),%edx
109280: 0f 85 d5 01 00 00 jne 10945b <rtems_termios_open+0x3ff>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
109286: 83 ec 0c sub $0xc,%esp
109289: 8b 45 e0 mov -0x20(%ebp),%eax
10928c: 83 c0 18 add $0x18,%eax
10928f: 50 push %eax
109290: 6a 00 push $0x0
109292: 6a 54 push $0x54
109294: 6a 01 push $0x1
rtems_build_name ('T', 'R', 'o', c),
109296: 0f be 05 4c 5a 12 00 movsbl 0x125a4c,%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 (
10929d: 0d 00 6f 52 54 or $0x54526f00,%eax
1092a2: 50 push %eax
1092a3: 89 55 dc mov %edx,-0x24(%ebp)
1092a6: e8 d1 21 00 00 call 10b47c <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)
1092ab: 83 c4 20 add $0x20,%esp
1092ae: 85 c0 test %eax,%eax
1092b0: 8b 55 dc mov -0x24(%ebp),%edx
1092b3: 0f 85 a2 01 00 00 jne 10945b <rtems_termios_open+0x3ff>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
1092b9: 83 ec 0c sub $0xc,%esp
1092bc: 8b 45 e0 mov -0x20(%ebp),%eax
1092bf: 05 8c 00 00 00 add $0x8c,%eax
1092c4: 50 push %eax
1092c5: 6a 00 push $0x0
1092c7: 6a 20 push $0x20
1092c9: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'x', c),
1092cb: 0f be 05 4c 5a 12 00 movsbl 0x125a4c,%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 (
1092d2: 0d 00 78 52 54 or $0x54527800,%eax
1092d7: 50 push %eax
1092d8: 89 55 dc mov %edx,-0x24(%ebp)
1092db: e8 9c 21 00 00 call 10b47c <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)
1092e0: 83 c4 20 add $0x20,%esp
1092e3: 85 c0 test %eax,%eax
1092e5: 8b 55 dc mov -0x24(%ebp),%edx
1092e8: 0f 85 6d 01 00 00 jne 10945b <rtems_termios_open+0x3ff>
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
1092ee: 8b 7d e0 mov -0x20(%ebp),%edi
1092f1: c7 87 94 00 00 00 00 movl $0x0,0x94(%edi)
1092f8: 00 00 00
/*
* Set callbacks
*/
tty->device = *callbacks;
1092fb: 81 c7 98 00 00 00 add $0x98,%edi
109301: b9 08 00 00 00 mov $0x8,%ecx
109306: 8b 75 14 mov 0x14(%ebp),%esi
109309: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
10930b: 8b 7d e0 mov -0x20(%ebp),%edi
10930e: 83 bf b4 00 00 00 02 cmpl $0x2,0xb4(%edi)
109315: 0f 84 64 01 00 00 je 10947f <rtems_termios_open+0x423><== NEVER TAKEN
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
10931b: 8b 45 e0 mov -0x20(%ebp),%eax
10931e: 8b 88 a0 00 00 00 mov 0xa0(%eax),%ecx
109324: 85 c9 test %ecx,%ecx
109326: 0f 84 fc 00 00 00 je 109428 <rtems_termios_open+0x3cc>
10932c: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax)
109333: 0f 84 ef 00 00 00 je 109428 <rtems_termios_open+0x3cc><== NEVER TAKEN
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
109339: 8b 4d e0 mov -0x20(%ebp),%ecx
10933c: c7 41 30 02 25 00 00 movl $0x2502,0x30(%ecx)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
109343: c7 41 34 05 18 00 00 movl $0x1805,0x34(%ecx)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
10934a: c7 41 38 bd 08 00 00 movl $0x8bd,0x38(%ecx)
tty->termios.c_lflag =
109351: c7 41 3c 3b 82 00 00 movl $0x823b,0x3c(%ecx)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
109358: c6 41 41 03 movb $0x3,0x41(%ecx)
tty->termios.c_cc[VQUIT] = '\034';
10935c: c6 41 42 1c movb $0x1c,0x42(%ecx)
tty->termios.c_cc[VERASE] = '\177';
109360: c6 41 43 7f movb $0x7f,0x43(%ecx)
tty->termios.c_cc[VKILL] = '\025';
109364: c6 41 44 15 movb $0x15,0x44(%ecx)
tty->termios.c_cc[VEOF] = '\004';
109368: c6 41 45 04 movb $0x4,0x45(%ecx)
tty->termios.c_cc[VEOL] = '\000';
10936c: c6 41 4c 00 movb $0x0,0x4c(%ecx)
tty->termios.c_cc[VEOL2] = '\000';
109370: c6 41 51 00 movb $0x0,0x51(%ecx)
tty->termios.c_cc[VSTART] = '\021';
109374: c6 41 49 11 movb $0x11,0x49(%ecx)
tty->termios.c_cc[VSTOP] = '\023';
109378: c6 41 4a 13 movb $0x13,0x4a(%ecx)
tty->termios.c_cc[VSUSP] = '\032';
10937c: c6 41 4b 1a movb $0x1a,0x4b(%ecx)
tty->termios.c_cc[VREPRINT] = '\022';
109380: c6 41 4d 12 movb $0x12,0x4d(%ecx)
tty->termios.c_cc[VDISCARD] = '\017';
109384: c6 41 4e 0f movb $0xf,0x4e(%ecx)
tty->termios.c_cc[VWERASE] = '\027';
109388: c6 41 4f 17 movb $0x17,0x4f(%ecx)
tty->termios.c_cc[VLNEXT] = '\026';
10938c: c6 41 50 16 movb $0x16,0x50(%ecx)
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
109390: c7 81 b8 00 00 00 00 movl $0x0,0xb8(%ecx)
109397: 00 00 00
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
10939a: 8b 41 64 mov 0x64(%ecx),%eax
10939d: d1 e8 shr %eax
10939f: 89 81 bc 00 00 00 mov %eax,0xbc(%ecx)
tty->highwater = tty->rawInBuf.Size * 3/4;
1093a5: 8b 41 64 mov 0x64(%ecx),%eax
1093a8: 8d 04 40 lea (%eax,%eax,2),%eax
1093ab: c1 e8 02 shr $0x2,%eax
1093ae: 89 81 c0 00 00 00 mov %eax,0xc0(%ecx)
/*
* Bump name characer
*/
if (c++ == 'z')
1093b4: a0 4c 5a 12 00 mov 0x125a4c,%al
1093b9: 8d 48 01 lea 0x1(%eax),%ecx
1093bc: 88 0d 4c 5a 12 00 mov %cl,0x125a4c
1093c2: 3c 7a cmp $0x7a,%al
1093c4: 0f 85 e6 fc ff ff jne 1090b0 <rtems_termios_open+0x54>
c = 'a';
1093ca: c6 05 4c 5a 12 00 61 movb $0x61,0x125a4c
1093d1: e9 da fc ff ff jmp 1090b0 <rtems_termios_open+0x54>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
1093d6: 83 ec 0c sub $0xc,%esp
1093d9: ff 35 2c 7d 12 00 pushl 0x127d2c
1093df: e8 10 24 00 00 call 10b7f4 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
1093e4: 83 c4 10 add $0x10,%esp
1093e7: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp)
1093ee: e9 01 fd ff ff jmp 1090f4 <rtems_termios_open+0x98>
* 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);
1093f3: 83 ec 0c sub $0xc,%esp
1093f6: 57 push %edi
*/
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);
1093f7: e8 d8 ec ff ff call 1080d4 <free>
rtems_semaphore_release (rtems_termios_ttyMutex);
1093fc: 5f pop %edi
1093fd: ff 35 2c 7d 12 00 pushl 0x127d2c
109403: e8 ec 23 00 00 call 10b7f4 <rtems_semaphore_release>
return RTEMS_NO_MEMORY;
109408: 83 c4 10 add $0x10,%esp
10940b: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp)
109412: e9 dd fc ff ff jmp 1090f4 <rtems_termios_open+0x98>
* 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));
109417: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10941a: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED
10941d: e8 b2 ec ff ff call 1080d4 <free> <== NOT EXECUTED
free(tty);
109422: 58 pop %eax <== NOT EXECUTED
109423: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED
109426: eb cf jmp 1093f7 <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 (
109428: 83 ec 0c sub $0xc,%esp
10942b: 8b 45 e0 mov -0x20(%ebp),%eax
10942e: 83 c0 68 add $0x68,%eax
109431: 50 push %eax
109432: 6a 00 push $0x0
109434: 6a 24 push $0x24
109436: 6a 00 push $0x0
rtems_build_name ('T', 'R', 'r', c),
109438: 0f be 05 4c 5a 12 00 movsbl 0x125a4c,%eax
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
10943f: 0d 00 72 52 54 or $0x54527200,%eax
109444: 50 push %eax
109445: 89 55 dc mov %edx,-0x24(%ebp)
109448: e8 2f 20 00 00 call 10b47c <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)
10944d: 83 c4 20 add $0x20,%esp
109450: 85 c0 test %eax,%eax
109452: 8b 55 dc mov -0x24(%ebp),%edx
109455: 0f 84 de fe ff ff je 109339 <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);
10945b: 83 ec 0c sub $0xc,%esp
10945e: 50 push %eax
10945f: e8 d8 28 00 00 call 10bd3c <rtems_fatal_error_occurred>
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
109464: 83 ec 0c sub $0xc,%esp
109467: 57 push %edi
109468: e8 67 ec ff ff call 1080d4 <free>
free((void *)(tty->rawInBuf.theBuf));
10946d: 5e pop %esi
10946e: ff 75 c4 pushl -0x3c(%ebp)
109471: e8 5e ec ff ff call 1080d4 <free>
free(tty);
109476: 5b pop %ebx
109477: ff 75 e0 pushl -0x20(%ebp)
10947a: e9 78 ff ff ff jmp 1093f7 <rtems_termios_open+0x39b>
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
10947f: 50 push %eax
109480: 50 push %eax
109481: 89 f8 mov %edi,%eax
109483: 05 c8 00 00 00 add $0xc8,%eax
109488: 50 push %eax
109489: 6a 00 push $0x0
10948b: 68 00 05 00 00 push $0x500
109490: 68 00 04 00 00 push $0x400
109495: 6a 0a push $0xa
rtems_build_name ('T', 'x', 'T', c),
109497: 0f be 05 4c 5a 12 00 movsbl 0x125a4c,%eax
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
10949e: 0d 00 54 78 54 or $0x54785400,%eax
1094a3: 50 push %eax
1094a4: 89 55 dc mov %edx,-0x24(%ebp)
1094a7: e8 e8 23 00 00 call 10b894 <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)
1094ac: 83 c4 20 add $0x20,%esp
1094af: 85 c0 test %eax,%eax
1094b1: 8b 55 dc mov -0x24(%ebp),%edx
1094b4: 75 a5 jne 10945b <rtems_termios_open+0x3ff><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
1094b6: 56 push %esi
1094b7: 56 push %esi
1094b8: 8b 45 e0 mov -0x20(%ebp),%eax
1094bb: 05 c4 00 00 00 add $0xc4,%eax
1094c0: 50 push %eax
1094c1: 6a 00 push $0x0
1094c3: 68 00 05 00 00 push $0x500
1094c8: 68 00 04 00 00 push $0x400
1094cd: 6a 09 push $0x9
rtems_build_name ('R', 'x', 'T', c),
1094cf: 0f be 05 4c 5a 12 00 movsbl 0x125a4c,%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 (
1094d6: 0d 00 54 78 52 or $0x52785400,%eax
1094db: 50 push %eax
1094dc: 89 55 dc mov %edx,-0x24(%ebp)
1094df: e8 b0 23 00 00 call 10b894 <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)
1094e4: 83 c4 20 add $0x20,%esp
1094e7: 85 c0 test %eax,%eax
1094e9: 8b 55 dc mov -0x24(%ebp),%edx
1094ec: 0f 84 29 fe ff ff je 10931b <rtems_termios_open+0x2bf>
1094f2: e9 64 ff ff ff jmp 10945b <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;
1094f7: a3 30 7d 12 00 mov %eax,0x127d30
1094fc: e9 47 fd ff ff jmp 109248 <rtems_termios_open+0x1ec>
00109b14 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
109b14: 55 push %ebp
109b15: 89 e5 mov %esp,%ebp
109b17: 57 push %edi
109b18: 56 push %esi
109b19: 53 push %ebx
109b1a: 83 ec 1c sub $0x1c,%esp
109b1d: 8b 45 08 mov 0x8(%ebp),%eax
109b20: 8b 55 0c mov 0xc(%ebp),%edx
109b23: 89 55 e4 mov %edx,-0x1c(%ebp)
109b26: 8b 5d 10 mov 0x10(%ebp),%ebx
const unsigned char *buf = _buf;
109b29: 89 c6 mov %eax,%esi
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
109b2b: 8b 8b b4 00 00 00 mov 0xb4(%ebx),%ecx
109b31: 85 c9 test %ecx,%ecx
109b33: 0f 84 eb 00 00 00 je 109c24 <rtems_termios_puts+0x110>
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
109b39: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
109b3f: 89 45 e0 mov %eax,-0x20(%ebp)
while (len) {
109b42: 8b 55 e4 mov -0x1c(%ebp),%edx
109b45: 85 d2 test %edx,%edx
109b47: 0f 84 cf 00 00 00 je 109c1c <rtems_termios_puts+0x108><== NEVER TAKEN
109b4d: 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;
109b50: 8b 45 e0 mov -0x20(%ebp),%eax
109b53: 40 inc %eax
109b54: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
109b5a: 31 d2 xor %edx,%edx
109b5c: f7 f1 div %ecx
109b5e: 89 55 dc mov %edx,-0x24(%ebp)
109b61: 89 55 e0 mov %edx,-0x20(%ebp)
rtems_interrupt_disable (level);
109b64: 9c pushf
109b65: fa cli
109b66: 5f pop %edi
while (newHead == tty->rawOutBuf.Tail) {
109b67: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
109b6d: 3b 55 e0 cmp -0x20(%ebp),%edx
109b70: 75 3e jne 109bb0 <rtems_termios_puts+0x9c>
109b72: 89 f8 mov %edi,%eax
109b74: 89 f7 mov %esi,%edi
109b76: 89 d6 mov %edx,%esi
tty->rawOutBufState = rob_wait;
109b78: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx)
109b7f: 00 00 00
rtems_interrupt_enable (level);
109b82: 50 push %eax
109b83: 9d popf
sc = rtems_semaphore_obtain(
109b84: 50 push %eax
109b85: 6a 00 push $0x0
109b87: 6a 00 push $0x0
109b89: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
109b8f: e8 64 1b 00 00 call 10b6f8 <rtems_semaphore_obtain>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
109b94: 83 c4 10 add $0x10,%esp
109b97: 85 c0 test %eax,%eax
109b99: 0f 85 a0 00 00 00 jne 109c3f <rtems_termios_puts+0x12b><== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
109b9f: 9c pushf
109ba0: fa cli
109ba1: 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) {
109ba2: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx
109ba8: 39 f2 cmp %esi,%edx
109baa: 74 cc je 109b78 <rtems_termios_puts+0x64><== NEVER TAKEN
109bac: 89 fe mov %edi,%esi
109bae: 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++;
109bb0: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
109bb6: 8b 4b 7c mov 0x7c(%ebx),%ecx
109bb9: 8a 16 mov (%esi),%dl
109bbb: 88 14 01 mov %dl,(%ecx,%eax,1)
tty->rawOutBuf.Head = newHead;
109bbe: 8b 45 dc mov -0x24(%ebp),%eax
109bc1: 89 83 80 00 00 00 mov %eax,0x80(%ebx)
if (tty->rawOutBufState == rob_idle) {
109bc7: 8b 8b 94 00 00 00 mov 0x94(%ebx),%ecx
109bcd: 85 c9 test %ecx,%ecx
109bcf: 75 23 jne 109bf4 <rtems_termios_puts+0xe0>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
109bd1: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
109bd7: a8 10 test $0x10,%al
109bd9: 74 26 je 109c01 <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;
109bdb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
109be1: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
109be4: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
109bea: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
109bf1: 00 00 00
}
rtems_interrupt_enable (level);
109bf4: 57 push %edi
109bf5: 9d popf
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
109bf6: ff 4d e4 decl -0x1c(%ebp)
109bf9: 74 21 je 109c1c <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++;
109bfb: 46 inc %esi
109bfc: e9 4f ff ff ff jmp 109b50 <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);
109c01: 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,
109c07: 52 push %edx
109c08: 6a 01 push $0x1
109c0a: 03 43 7c add 0x7c(%ebx),%eax
109c0d: 50 push %eax
109c0e: ff 73 10 pushl 0x10(%ebx)
109c11: ff 93 a4 00 00 00 call *0xa4(%ebx)
109c17: 83 c4 10 add $0x10,%esp
109c1a: eb ce jmp 109bea <rtems_termios_puts+0xd6>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
109c1c: 8d 65 f4 lea -0xc(%ebp),%esp
109c1f: 5b pop %ebx
109c20: 5e pop %esi
109c21: 5f pop %edi
109c22: c9 leave
109c23: 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);
109c24: 89 55 10 mov %edx,0x10(%ebp)
109c27: 89 45 0c mov %eax,0xc(%ebp)
109c2a: 8b 43 10 mov 0x10(%ebx),%eax
109c2d: 89 45 08 mov %eax,0x8(%ebp)
109c30: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
109c36: 8d 65 f4 lea -0xc(%ebp),%esp
109c39: 5b pop %ebx
109c3a: 5e pop %esi
109c3b: 5f pop %edi
109c3c: 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);
109c3d: 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);
109c3f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
109c42: 50 push %eax <== NOT EXECUTED
109c43: e8 f4 20 00 00 call 10bd3c <rtems_fatal_error_occurred><== NOT EXECUTED
0010a220 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
10a220: 55 push %ebp
10a221: 89 e5 mov %esp,%ebp
10a223: 57 push %edi
10a224: 56 push %esi
10a225: 53 push %ebx
10a226: 83 ec 30 sub $0x30,%esp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10a229: 8b 55 08 mov 0x8(%ebp),%edx
10a22c: 8b 02 mov (%edx),%eax
10a22e: 8b 58 34 mov 0x34(%eax),%ebx
uint32_t count = args->count;
10a231: 8b 4a 10 mov 0x10(%edx),%ecx
10a234: 89 4d dc mov %ecx,-0x24(%ebp)
char *buffer = args->buffer;
10a237: 8b 42 0c mov 0xc(%edx),%eax
10a23a: 89 45 d8 mov %eax,-0x28(%ebp)
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10a23d: 6a 00 push $0x0
10a23f: 6a 00 push $0x0
10a241: ff 73 14 pushl 0x14(%ebx)
10a244: e8 af 14 00 00 call 10b6f8 <rtems_semaphore_obtain>
10a249: 89 45 e0 mov %eax,-0x20(%ebp)
if (sc != RTEMS_SUCCESSFUL)
10a24c: 83 c4 10 add $0x10,%esp
10a24f: 85 c0 test %eax,%eax
10a251: 75 35 jne 10a288 <rtems_termios_read+0x68><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
10a253: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10a259: c1 e0 05 shl $0x5,%eax
10a25c: 8b 80 c8 79 12 00 mov 0x1279c8(%eax),%eax
10a262: 85 c0 test %eax,%eax
10a264: 74 2e je 10a294 <rtems_termios_read+0x74>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
10a266: 83 ec 08 sub $0x8,%esp
10a269: ff 75 08 pushl 0x8(%ebp)
10a26c: 53 push %ebx
10a26d: ff d0 call *%eax
10a26f: 89 45 e0 mov %eax,-0x20(%ebp)
tty->tty_rcvwakeup = 0;
10a272: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10a279: 00 00 00
rtems_semaphore_release (tty->isem);
10a27c: 59 pop %ecx
10a27d: ff 73 14 pushl 0x14(%ebx)
10a280: e8 6f 15 00 00 call 10b7f4 <rtems_semaphore_release>
return sc;
10a285: 83 c4 10 add $0x10,%esp
}
args->bytes_moved = args->count - count;
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
10a288: 8b 45 e0 mov -0x20(%ebp),%eax
10a28b: 8d 65 f4 lea -0xc(%ebp),%esp
10a28e: 5b pop %ebx
10a28f: 5e pop %esi
10a290: 5f pop %edi
10a291: c9 leave
10a292: c3 ret
10a293: 90 nop
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
10a294: 8b 53 20 mov 0x20(%ebx),%edx
10a297: 39 53 24 cmp %edx,0x24(%ebx)
10a29a: 74 5f je 10a2fb <rtems_termios_read+0xdb><== ALWAYS TAKEN
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
10a29c: 8b 45 dc mov -0x24(%ebp),%eax
10a29f: 85 c0 test %eax,%eax
10a2a1: 74 29 je 10a2cc <rtems_termios_read+0xac><== NEVER TAKEN
10a2a3: 8b 43 24 mov 0x24(%ebx),%eax
10a2a6: 3b 43 20 cmp 0x20(%ebx),%eax
10a2a9: 7d 21 jge 10a2cc <rtems_termios_read+0xac><== NEVER TAKEN
10a2ab: 8b 55 d8 mov -0x28(%ebp),%edx
10a2ae: 8b 7d dc mov -0x24(%ebp),%edi
10a2b1: eb 06 jmp 10a2b9 <rtems_termios_read+0x99>
10a2b3: 90 nop
10a2b4: 39 43 20 cmp %eax,0x20(%ebx)
10a2b7: 7e 10 jle 10a2c9 <rtems_termios_read+0xa9>
*buffer++ = tty->cbuf[tty->cindex++];
10a2b9: 8b 73 1c mov 0x1c(%ebx),%esi
10a2bc: 8a 0c 06 mov (%esi,%eax,1),%cl
10a2bf: 88 0a mov %cl,(%edx)
10a2c1: 42 inc %edx
10a2c2: 40 inc %eax
10a2c3: 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)) {
10a2c6: 4f dec %edi
10a2c7: 75 eb jne 10a2b4 <rtems_termios_read+0x94>
10a2c9: 89 7d dc mov %edi,-0x24(%ebp)
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
10a2cc: 8b 55 08 mov 0x8(%ebp),%edx
10a2cf: 8b 42 10 mov 0x10(%edx),%eax
10a2d2: 2b 45 dc sub -0x24(%ebp),%eax
10a2d5: 89 42 18 mov %eax,0x18(%edx)
tty->tty_rcvwakeup = 0;
10a2d8: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx)
10a2df: 00 00 00
rtems_semaphore_release (tty->isem);
10a2e2: 83 ec 0c sub $0xc,%esp
10a2e5: ff 73 14 pushl 0x14(%ebx)
10a2e8: e8 07 15 00 00 call 10b7f4 <rtems_semaphore_release>
return sc;
10a2ed: 83 c4 10 add $0x10,%esp
}
10a2f0: 8b 45 e0 mov -0x20(%ebp),%eax
10a2f3: 8d 65 f4 lea -0xc(%ebp),%esp
10a2f6: 5b pop %ebx
10a2f7: 5e pop %esi
10a2f8: 5f pop %edi
10a2f9: c9 leave
10a2fa: c3 ret
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
10a2fb: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx)
10a302: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx)
tty->read_start_column = tty->column;
10a309: 8b 43 28 mov 0x28(%ebx),%eax
10a30c: 89 43 2c mov %eax,0x2c(%ebx)
if (tty->device.pollRead != NULL &&
10a30f: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
10a315: 85 c0 test %eax,%eax
10a317: 74 0e je 10a327 <rtems_termios_read+0x107>
10a319: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx
10a31f: 85 d2 test %edx,%edx
10a321: 0f 84 82 01 00 00 je 10a4a9 <rtems_termios_read+0x289><== 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;
10a327: 8b 73 74 mov 0x74(%ebx),%esi
rtems_status_code sc;
int wait = (int)1;
10a32a: 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)(
10a331: 8d 4b 49 lea 0x49(%ebx),%ecx
10a334: 89 4d d4 mov %ecx,-0x2c(%ebp)
10a337: 90 nop
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a338: 8b 53 5c mov 0x5c(%ebx),%edx
10a33b: 8b 43 60 mov 0x60(%ebx),%eax
10a33e: 39 c2 cmp %eax,%edx
10a340: 0f 84 06 01 00 00 je 10a44c <rtems_termios_read+0x22c><== NEVER TAKEN
(tty->ccount < (CBUFSIZE-1))) {
10a346: a1 40 5a 12 00 mov 0x125a40,%eax
10a34b: 48 dec %eax
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a34c: 3b 43 20 cmp 0x20(%ebx),%eax
10a34f: 7f 3c jg 10a38d <rtems_termios_read+0x16d><== ALWAYS TAKEN
10a351: e9 f6 00 00 00 jmp 10a44c <rtems_termios_read+0x22c><== NOT EXECUTED
10a356: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
10a358: 0f b6 c1 movzbl %cl,%eax
10a35b: 89 da mov %ebx,%edx
10a35d: e8 9e fd ff ff call 10a100 <siproc>
10a362: 85 c0 test %eax,%eax
10a364: 74 07 je 10a36d <rtems_termios_read+0x14d>
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
10a366: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
}
timeout = tty->rawInBufSemaphoreTimeout;
10a36d: 8b 73 70 mov 0x70(%ebx),%esi
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a370: 8b 53 5c mov 0x5c(%ebx),%edx
10a373: 8b 43 60 mov 0x60(%ebx),%eax
10a376: 39 c2 cmp %eax,%edx
10a378: 0f 84 ce 00 00 00 je 10a44c <rtems_termios_read+0x22c><== NEVER TAKEN
(tty->ccount < (CBUFSIZE-1))) {
10a37e: a1 40 5a 12 00 mov 0x125a40,%eax
10a383: 48 dec %eax
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a384: 39 43 20 cmp %eax,0x20(%ebx)
10a387: 0f 8d bf 00 00 00 jge 10a44c <rtems_termios_read+0x22c><== NEVER TAKEN
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
10a38d: 8b 43 5c mov 0x5c(%ebx),%eax
10a390: 8b 4b 64 mov 0x64(%ebx),%ecx
10a393: 40 inc %eax
10a394: 31 d2 xor %edx,%edx
10a396: f7 f1 div %ecx
c = tty->rawInBuf.theBuf[newHead];
10a398: 8b 43 58 mov 0x58(%ebx),%eax
10a39b: 8a 0c 10 mov (%eax,%edx,1),%cl
tty->rawInBuf.Head = newHead;
10a39e: 89 53 5c mov %edx,0x5c(%ebx)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
10a3a1: 8b 43 60 mov 0x60(%ebx),%eax
10a3a4: 8b 7b 64 mov 0x64(%ebx),%edi
% tty->rawInBuf.Size)
10a3a7: 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)
10a3aa: 8d 04 07 lea (%edi,%eax,1),%eax
10a3ad: 29 d0 sub %edx,%eax
% tty->rawInBuf.Size)
10a3af: 31 d2 xor %edx,%edx
10a3b1: 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)
10a3b3: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx
10a3b9: 73 5d jae 10a418 <rtems_termios_read+0x1f8><== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
10a3bb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a3c1: 83 e0 fe and $0xfffffffe,%eax
10a3c4: 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))
10a3ca: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a3d0: 25 02 02 00 00 and $0x202,%eax
10a3d5: 3d 02 02 00 00 cmp $0x202,%eax
10a3da: 0f 84 94 00 00 00 je 10a474 <rtems_termios_read+0x254><== 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) {
10a3e0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a3e6: f6 c4 01 test $0x1,%ah
10a3e9: 74 2d je 10a418 <rtems_termios_read+0x1f8><== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
10a3eb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a3f1: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED
10a3f4: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
10a3fa: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED
10a400: 85 c0 test %eax,%eax <== NOT EXECUTED
10a402: 74 14 je 10a418 <rtems_termios_read+0x1f8><== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
10a404: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a407: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a40a: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED
10a40d: ff d0 call *%eax <== NOT EXECUTED
10a40f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a412: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED
10a415: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
10a418: f6 43 3c 02 testb $0x2,0x3c(%ebx)
10a41c: 0f 85 36 ff ff ff jne 10a358 <rtems_termios_read+0x138><== ALWAYS TAKEN
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
10a422: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED
10a425: 89 da mov %ebx,%edx <== NOT EXECUTED
10a427: e8 d4 fc ff ff call 10a100 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
10a42c: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED
10a430: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED
10a433: 0f 8d 2d ff ff ff jge 10a366 <rtems_termios_read+0x146><== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
10a439: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
10a43c: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED
10a43f: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED
10a442: 39 c2 cmp %eax,%edx <== NOT EXECUTED
10a444: 0f 85 34 ff ff ff jne 10a37e <rtems_termios_read+0x15e><== NOT EXECUTED
10a44a: 66 90 xchg %ax,%ax <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
10a44c: 8b 4d e4 mov -0x1c(%ebp),%ecx
10a44f: 85 c9 test %ecx,%ecx
10a451: 0f 84 45 fe ff ff je 10a29c <rtems_termios_read+0x7c><== NEVER TAKEN
sc = rtems_semaphore_obtain(
10a457: 52 push %edx
10a458: 56 push %esi
10a459: ff 73 6c pushl 0x6c(%ebx)
10a45c: ff 73 68 pushl 0x68(%ebx)
10a45f: e8 94 12 00 00 call 10b6f8 <rtems_semaphore_obtain>
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
10a464: 83 c4 10 add $0x10,%esp
10a467: 85 c0 test %eax,%eax
10a469: 0f 84 c9 fe ff ff je 10a338 <rtems_termios_read+0x118>
10a46f: e9 28 fe ff ff jmp 10a29c <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)
10a474: 8b bb 94 00 00 00 mov 0x94(%ebx),%edi <== NOT EXECUTED
10a47a: 85 ff test %edi,%edi <== NOT EXECUTED
10a47c: 74 0e je 10a48c <rtems_termios_read+0x26c><== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
10a47e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10a484: a8 20 test $0x20,%al <== NOT EXECUTED
10a486: 0f 84 54 ff ff ff je 10a3e0 <rtems_termios_read+0x1c0><== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
10a48c: 56 push %esi <== NOT EXECUTED
10a48d: 6a 01 push $0x1 <== NOT EXECUTED
10a48f: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED
10a492: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10a495: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED
10a498: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
10a49e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a4a1: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED
10a4a4: e9 6f ff ff ff jmp 10a418 <rtems_termios_read+0x1f8><== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
10a4a9: f6 43 3c 02 testb $0x2,0x3c(%ebx)
10a4ad: 75 1d jne 10a4cc <rtems_termios_read+0x2ac>
10a4af: eb 39 jmp 10a4ea <rtems_termios_read+0x2ca>
10a4b1: 8d 76 00 lea 0x0(%esi),%esi
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
10a4b4: 0f b6 c0 movzbl %al,%eax
10a4b7: 89 da mov %ebx,%edx
10a4b9: e8 42 fc ff ff call 10a100 <siproc>
10a4be: 85 c0 test %eax,%eax
10a4c0: 0f 85 d6 fd ff ff jne 10a29c <rtems_termios_read+0x7c><== NEVER TAKEN
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
10a4c6: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
10a4cc: 83 ec 0c sub $0xc,%esp
10a4cf: ff 73 10 pushl 0x10(%ebx)
10a4d2: ff d0 call *%eax
if (n < 0) {
10a4d4: 83 c4 10 add $0x10,%esp
10a4d7: 85 c0 test %eax,%eax
10a4d9: 79 d9 jns 10a4b4 <rtems_termios_read+0x294>
rtems_task_wake_after (1);
10a4db: 83 ec 0c sub $0xc,%esp
10a4de: 6a 01 push $0x1
10a4e0: e8 cb 16 00 00 call 10bbb0 <rtems_task_wake_after>
10a4e5: 83 c4 10 add $0x10,%esp
10a4e8: eb dc jmp 10a4c6 <rtems_termios_read+0x2a6>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
10a4ea: e8 01 0b 00 00 call 10aff0 <rtems_clock_get_ticks_since_boot>
10a4ef: 89 c6 mov %eax,%esi
10a4f1: 8d 76 00 lea 0x0(%esi),%esi
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
10a4f4: 83 ec 0c sub $0xc,%esp
10a4f7: ff 73 10 pushl 0x10(%ebx)
10a4fa: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (n < 0) {
10a500: 83 c4 10 add $0x10,%esp
10a503: 85 c0 test %eax,%eax
10a505: 78 25 js 10a52c <rtems_termios_read+0x30c>
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
10a507: 0f b6 c0 movzbl %al,%eax
10a50a: 89 da mov %ebx,%edx
10a50c: e8 ef fb ff ff call 10a100 <siproc>
if (tty->ccount >= tty->termios.c_cc[VMIN])
10a511: 8a 43 47 mov 0x47(%ebx),%al
10a514: 0f b6 d0 movzbl %al,%edx
10a517: 39 53 20 cmp %edx,0x20(%ebx)
10a51a: 0f 8d 7c fd ff ff jge 10a29c <rtems_termios_read+0x7c><== NEVER TAKEN
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
10a520: 84 c0 test %al,%al
10a522: 74 d0 je 10a4f4 <rtems_termios_read+0x2d4><== NEVER TAKEN
10a524: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
10a528: 74 ca je 10a4f4 <rtems_termios_read+0x2d4><== NEVER TAKEN
10a52a: eb be jmp 10a4ea <rtems_termios_read+0x2ca>
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
10a52c: 80 7b 47 00 cmpb $0x0,0x47(%ebx)
10a530: 74 1d je 10a54f <rtems_termios_read+0x32f><== NEVER TAKEN
if (tty->termios.c_cc[VTIME] && tty->ccount) {
10a532: 80 7b 46 00 cmpb $0x0,0x46(%ebx)
10a536: 74 08 je 10a540 <rtems_termios_read+0x320><== NEVER TAKEN
10a538: 8b 43 20 mov 0x20(%ebx),%eax
10a53b: 85 c0 test %eax,%eax
10a53d: 75 1a jne 10a559 <rtems_termios_read+0x339>
10a53f: 90 nop
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
10a540: 83 ec 0c sub $0xc,%esp
10a543: 6a 01 push $0x1
10a545: e8 66 16 00 00 call 10bbb0 <rtems_task_wake_after>
10a54a: 83 c4 10 add $0x10,%esp
10a54d: eb a5 jmp 10a4f4 <rtems_termios_read+0x2d4>
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
10a54f: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED
10a553: 0f 84 43 fd ff ff je 10a29c <rtems_termios_read+0x7c><== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
10a559: e8 92 0a 00 00 call 10aff0 <rtems_clock_get_ticks_since_boot>
if ((now - then) > tty->vtimeTicks) {
10a55e: 29 f0 sub %esi,%eax
10a560: 3b 43 54 cmp 0x54(%ebx),%eax
10a563: 76 db jbe 10a540 <rtems_termios_read+0x320>
10a565: e9 32 fd ff ff jmp 10a29c <rtems_termios_read+0x7c>
0010a900 <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)
{
10a900: 55 push %ebp
10a901: 89 e5 mov %esp,%ebp
10a903: 57 push %edi
10a904: 56 push %esi
10a905: 53 push %ebx
10a906: 83 ec 0c sub $0xc,%esp
10a909: 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))
10a90c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a912: 25 03 04 00 00 and $0x403,%eax
10a917: 3d 01 04 00 00 cmp $0x401,%eax
10a91c: 0f 84 62 01 00 00 je 10aa84 <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) {
10a922: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a928: 83 e0 03 and $0x3,%eax
10a92b: 83 f8 02 cmp $0x2,%eax
10a92e: 0f 84 8c 01 00 00 je 10aac0 <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 ) {
10a934: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx
10a93a: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
10a940: 39 c2 cmp %eax,%edx
10a942: 0f 84 a4 00 00 00 je 10a9ec <rtems_termios_refill_transmitter+0xec>
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
10a948: 9c pushf
10a949: fa cli
10a94a: 58 pop %eax
len = tty->t_dqlen;
10a94b: 8b b3 90 00 00 00 mov 0x90(%ebx),%esi
tty->t_dqlen = 0;
10a951: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx)
10a958: 00 00 00
rtems_interrupt_enable(level);
10a95b: 50 push %eax
10a95c: 9d popf
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
10a95d: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax
10a963: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx
10a969: 8d 04 06 lea (%esi,%eax,1),%eax
10a96c: 31 d2 xor %edx,%edx
10a96e: f7 f1 div %ecx
10a970: 89 d6 mov %edx,%esi
tty->rawOutBuf.Tail = newTail;
10a972: 89 93 84 00 00 00 mov %edx,0x84(%ebx)
if (tty->rawOutBufState == rob_wait) {
10a978: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
10a97f: 0f 84 e7 00 00 00 je 10aa6c <rtems_termios_refill_transmitter+0x16c>
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
10a985: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
10a98b: 39 f0 cmp %esi,%eax
10a98d: 74 79 je 10aa08 <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))
10a98f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a995: 25 10 02 00 00 and $0x210,%eax
10a99a: 3d 10 02 00 00 cmp $0x210,%eax
10a99f: 0f 84 57 01 00 00 je 10aafc <rtems_termios_refill_transmitter+0x1fc><== NEVER TAKEN
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
10a9a5: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax
10a9ab: 39 c6 cmp %eax,%esi
10a9ad: 0f 87 91 00 00 00 ja 10aa44 <rtems_termios_refill_transmitter+0x144>
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
10a9b3: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi
10a9b9: 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)) {
10a9bb: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10a9c1: f6 c4 06 test $0x6,%ah
10a9c4: 0f 85 91 00 00 00 jne 10aa5b <rtems_termios_refill_transmitter+0x15b>
10a9ca: 89 f8 mov %edi,%eax
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
10a9cc: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx)
10a9d3: 00 00 00
(*tty->device.write)(
10a9d6: 52 push %edx
10a9d7: 50 push %eax
10a9d8: 8b 43 7c mov 0x7c(%ebx),%eax
10a9db: 01 f0 add %esi,%eax
10a9dd: 50 push %eax
10a9de: ff 73 10 pushl 0x10(%ebx)
10a9e1: ff 93 a4 00 00 00 call *0xa4(%ebx)
10a9e7: 83 c4 10 add $0x10,%esp
10a9ea: eb 48 jmp 10aa34 <rtems_termios_refill_transmitter+0x134>
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
10a9ec: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx)
10a9f3: 0f 84 2b 01 00 00 je 10ab24 <rtems_termios_refill_transmitter+0x224><== NEVER TAKEN
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
10a9f9: 31 ff xor %edi,%edi
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10a9fb: 89 f8 mov %edi,%eax
10a9fd: 8d 65 f4 lea -0xc(%ebp),%esp
10aa00: 5b pop %ebx
10aa01: 5e pop %esi
10aa02: 5f pop %edi
10aa03: c9 leave
10aa04: c3 ret
10aa05: 8d 76 00 lea 0x0(%esi),%esi
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
10aa08: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx)
10aa0f: 00 00 00
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
10aa12: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax
10aa18: 85 c0 test %eax,%eax
10aa1a: 0f 84 1c 01 00 00 je 10ab3c <rtems_termios_refill_transmitter+0x23c><== ALWAYS TAKEN
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
10aa20: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10aa23: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED
10aa29: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED
10aa2c: 52 push %edx <== NOT EXECUTED
10aa2d: ff d0 call *%eax <== NOT EXECUTED
10aa2f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
10aa32: 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*/
10aa34: 89 b3 84 00 00 00 mov %esi,0x84(%ebx)
}
return nToSend;
}
10aa3a: 89 f8 mov %edi,%eax
10aa3c: 8d 65 f4 lea -0xc(%ebp),%esp
10aa3f: 5b pop %ebx
10aa40: 5e pop %esi
10aa41: 5f pop %edi
10aa42: c9 leave
10aa43: c3 ret
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
10aa44: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi
10aa4a: 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)) {
10aa4c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax
10aa52: f6 c4 06 test $0x6,%ah
10aa55: 0f 84 6f ff ff ff je 10a9ca <rtems_termios_refill_transmitter+0xca><== ALWAYS TAKEN
10aa5b: b8 01 00 00 00 mov $0x1,%eax
nToSend = 1;
10aa60: bf 01 00 00 00 mov $0x1,%edi
10aa65: e9 62 ff ff ff jmp 10a9cc <rtems_termios_refill_transmitter+0xcc>
10aa6a: 66 90 xchg %ax,%ax
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
10aa6c: 83 ec 0c sub $0xc,%esp
10aa6f: ff b3 8c 00 00 00 pushl 0x8c(%ebx)
10aa75: e8 7a 0d 00 00 call 10b7f4 <rtems_semaphore_release>
10aa7a: 83 c4 10 add $0x10,%esp
10aa7d: e9 03 ff ff ff jmp 10a985 <rtems_termios_refill_transmitter+0x85>
10aa82: 66 90 xchg %ax,%ax
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
10aa84: 56 push %esi <== NOT EXECUTED
10aa85: 6a 01 push $0x1 <== NOT EXECUTED
10aa87: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED
10aa8a: 50 push %eax <== NOT EXECUTED
10aa8b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10aa8e: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
10aa94: 9c pushf <== NOT EXECUTED
10aa95: fa cli <== NOT EXECUTED
10aa96: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
10aa97: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
10aa9d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10aaa3: 83 c8 02 or $0x2,%eax <== NOT EXECUTED
10aaa6: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
10aaac: 52 push %edx <== NOT EXECUTED
10aaad: 9d popf <== NOT EXECUTED
10aaae: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend = 1;
10aab1: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10aab6: 89 f8 mov %edi,%eax <== NOT EXECUTED
10aab8: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10aabb: 5b pop %ebx <== NOT EXECUTED
10aabc: 5e pop %esi <== NOT EXECUTED
10aabd: 5f pop %edi <== NOT EXECUTED
10aabe: c9 leave <== NOT EXECUTED
10aabf: 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);
10aac0: 51 push %ecx <== NOT EXECUTED
10aac1: 6a 01 push $0x1 <== NOT EXECUTED
10aac3: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED
10aac6: 50 push %eax <== NOT EXECUTED
10aac7: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED
10aaca: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED
rtems_interrupt_disable(level);
10aad0: 9c pushf <== NOT EXECUTED
10aad1: fa cli <== NOT EXECUTED
10aad2: 5a pop %edx <== NOT EXECUTED
tty->t_dqlen--;
10aad3: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
10aad9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10aadf: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED
10aae2: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
rtems_interrupt_enable(level);
10aae8: 52 push %edx <== NOT EXECUTED
10aae9: 9d popf <== NOT EXECUTED
10aaea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
nToSend = 1;
10aaed: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
10aaf2: 89 f8 mov %edi,%eax <== NOT EXECUTED
10aaf4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10aaf7: 5b pop %ebx <== NOT EXECUTED
10aaf8: 5e pop %esi <== NOT EXECUTED
10aaf9: 5f pop %edi <== NOT EXECUTED
10aafa: c9 leave <== NOT EXECUTED
10aafb: 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);
10aafc: 9c pushf <== NOT EXECUTED
10aafd: fa cli <== NOT EXECUTED
10aafe: 5a pop %edx <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
10aaff: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED
10ab05: 83 c8 20 or $0x20,%eax <== NOT EXECUTED
10ab08: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
10ab0e: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED
10ab15: 00 00 00
rtems_interrupt_enable(level);
10ab18: 52 push %edx <== NOT EXECUTED
10ab19: 9d popf <== NOT EXECUTED
nToSend = 0;
10ab1a: 31 ff xor %edi,%edi <== NOT EXECUTED
10ab1c: e9 13 ff ff ff jmp 10aa34 <rtems_termios_refill_transmitter+0x134><== NOT EXECUTED
10ab21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
10ab24: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ab27: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED
10ab2d: e8 c2 0c 00 00 call 10b7f4 <rtems_semaphore_release><== NOT EXECUTED
10ab32: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
return 0;
10ab35: 31 ff xor %edi,%edi <== NOT EXECUTED
10ab37: e9 bf fe ff ff jmp 10a9fb <rtems_termios_refill_transmitter+0xfb><== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
10ab3c: 31 ff xor %edi,%edi
10ab3e: e9 f1 fe ff ff jmp 10aa34 <rtems_termios_refill_transmitter+0x134>
0010a894 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
10a894: 55 push %ebp
10a895: 89 e5 mov %esp,%ebp
10a897: 57 push %edi
10a898: 56 push %esi
10a899: 53 push %ebx
10a89a: 83 ec 1c sub $0x1c,%esp
10a89d: 8b 5d 08 mov 0x8(%ebp),%ebx
10a8a0: 8d 75 e0 lea -0x20(%ebp),%esi
10a8a3: 8d 7d e7 lea -0x19(%ebp),%edi
10a8a6: eb 14 jmp 10a8bc <rtems_termios_rxdaemon+0x28>
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
10a8a8: 83 ec 0c sub $0xc,%esp
10a8ab: ff 73 10 pushl 0x10(%ebx)
10a8ae: ff 93 a0 00 00 00 call *0xa0(%ebx)
if (c != EOF) {
10a8b4: 83 c4 10 add $0x10,%esp
10a8b7: 83 f8 ff cmp $0xffffffff,%eax
10a8ba: 75 30 jne 10a8ec <rtems_termios_rxdaemon+0x58>
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
10a8bc: 56 push %esi
10a8bd: 6a 00 push $0x0
10a8bf: 6a 02 push $0x2
10a8c1: 6a 03 push $0x3
10a8c3: e8 94 07 00 00 call 10b05c <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) {
10a8c8: 83 c4 10 add $0x10,%esp
10a8cb: f6 45 e0 01 testb $0x1,-0x20(%ebp)
10a8cf: 74 d7 je 10a8a8 <rtems_termios_rxdaemon+0x14><== ALWAYS TAKEN
tty->rxTaskId = 0;
10a8d1: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED
10a8d8: 00 00 00
rtems_task_delete(RTEMS_SELF);
10a8db: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10a8de: 6a 00 push $0x0 <== NOT EXECUTED
10a8e0: e8 0f 11 00 00 call 10b9f4 <rtems_task_delete> <== NOT EXECUTED
10a8e5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a8e8: eb be jmp 10a8a8 <rtems_termios_rxdaemon+0x14><== NOT EXECUTED
10a8ea: 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;
10a8ec: 88 45 e7 mov %al,-0x19(%ebp)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
10a8ef: 50 push %eax
10a8f0: 6a 01 push $0x1
10a8f2: 57 push %edi
10a8f3: 53 push %ebx
10a8f4: e8 8f fc ff ff call 10a588 <rtems_termios_enqueue_raw_characters>
10a8f9: 83 c4 10 add $0x10,%esp
10a8fc: eb be jmp 10a8bc <rtems_termios_rxdaemon+0x28>
0010ab44 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
10ab44: 55 push %ebp
10ab45: 89 e5 mov %esp,%ebp
10ab47: 56 push %esi
10ab48: 53 push %ebx
10ab49: 83 ec 10 sub $0x10,%esp
10ab4c: 8b 5d 08 mov 0x8(%ebp),%ebx
10ab4f: 8d 75 f4 lea -0xc(%ebp),%esi
10ab52: eb 28 jmp 10ab7c <rtems_termios_txdaemon+0x38>
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
10ab54: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax
10ab5a: c1 e0 05 shl $0x5,%eax
10ab5d: 8b 80 d4 79 12 00 mov 0x1279d4(%eax),%eax
10ab63: 85 c0 test %eax,%eax
10ab65: 74 09 je 10ab70 <rtems_termios_txdaemon+0x2c><== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
10ab67: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ab6a: 53 push %ebx <== NOT EXECUTED
10ab6b: ff d0 call *%eax <== NOT EXECUTED
10ab6d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
10ab70: 83 ec 0c sub $0xc,%esp
10ab73: 53 push %ebx
10ab74: e8 87 fd ff ff call 10a900 <rtems_termios_refill_transmitter>
}
10ab79: 83 c4 10 add $0x10,%esp
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
10ab7c: 56 push %esi
10ab7d: 6a 00 push $0x0
10ab7f: 6a 02 push $0x2
10ab81: 6a 03 push $0x3
10ab83: e8 d4 04 00 00 call 10b05c <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) {
10ab88: 83 c4 10 add $0x10,%esp
10ab8b: f6 45 f4 01 testb $0x1,-0xc(%ebp)
10ab8f: 74 c3 je 10ab54 <rtems_termios_txdaemon+0x10><== ALWAYS TAKEN
tty->txTaskId = 0;
10ab91: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED
10ab98: 00 00 00
rtems_task_delete(RTEMS_SELF);
10ab9b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10ab9e: 6a 00 push $0x0 <== NOT EXECUTED
10aba0: e8 4f 0e 00 00 call 10b9f4 <rtems_task_delete> <== NOT EXECUTED
10aba5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10aba8: eb aa jmp 10ab54 <rtems_termios_txdaemon+0x10><== NOT EXECUTED
0010a154 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
10a154: 55 push %ebp
10a155: 89 e5 mov %esp,%ebp
10a157: 57 push %edi
10a158: 56 push %esi
10a159: 53 push %ebx
10a15a: 83 ec 20 sub $0x20,%esp
10a15d: 8b 7d 08 mov 0x8(%ebp),%edi
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
10a160: 8b 07 mov (%edi),%eax
10a162: 8b 70 34 mov 0x34(%eax),%esi
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
10a165: 6a 00 push $0x0
10a167: 6a 00 push $0x0
10a169: ff 76 18 pushl 0x18(%esi)
10a16c: e8 87 15 00 00 call 10b6f8 <rtems_semaphore_obtain>
10a171: 89 45 e4 mov %eax,-0x1c(%ebp)
if (sc != RTEMS_SUCCESSFUL)
10a174: 83 c4 10 add $0x10,%esp
10a177: 85 c0 test %eax,%eax
10a179: 75 29 jne 10a1a4 <rtems_termios_write+0x50><== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
10a17b: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax
10a181: c1 e0 05 shl $0x5,%eax
10a184: 8b 80 cc 79 12 00 mov 0x1279cc(%eax),%eax
10a18a: 85 c0 test %eax,%eax
10a18c: 74 22 je 10a1b0 <rtems_termios_write+0x5c>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
10a18e: 83 ec 08 sub $0x8,%esp
10a191: 57 push %edi
10a192: 56 push %esi
10a193: ff d0 call *%eax
10a195: 89 45 e4 mov %eax,-0x1c(%ebp)
rtems_semaphore_release (tty->osem);
10a198: 5f pop %edi
10a199: ff 76 18 pushl 0x18(%esi)
10a19c: e8 53 16 00 00 call 10b7f4 <rtems_semaphore_release>
return sc;
10a1a1: 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;
}
10a1a4: 8b 45 e4 mov -0x1c(%ebp),%eax
10a1a7: 8d 65 f4 lea -0xc(%ebp),%esp
10a1aa: 5b pop %ebx
10a1ab: 5e pop %esi
10a1ac: 5f pop %edi
10a1ad: c9 leave
10a1ae: c3 ret
10a1af: 90 nop
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) {
10a1b0: f6 46 34 01 testb $0x1,0x34(%esi)
10a1b4: 74 4e je 10a204 <rtems_termios_write+0xb0><== NEVER TAKEN
uint32_t count = args->count;
10a1b6: 8b 47 10 mov 0x10(%edi),%eax
10a1b9: 89 45 e0 mov %eax,-0x20(%ebp)
char *buffer = args->buffer;
10a1bc: 8b 47 0c mov 0xc(%edi),%eax
while (count--)
10a1bf: 8b 5d e0 mov -0x20(%ebp),%ebx
10a1c2: 85 db test %ebx,%ebx
10a1c4: 74 56 je 10a21c <rtems_termios_write+0xc8><== NEVER TAKEN
10a1c6: 31 db xor %ebx,%ebx
10a1c8: 89 7d dc mov %edi,-0x24(%ebp)
10a1cb: 89 c7 mov %eax,%edi
10a1cd: 8d 76 00 lea 0x0(%esi),%esi
oproc (*buffer++, tty);
10a1d0: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax
10a1d4: 89 f2 mov %esi,%edx
10a1d6: e8 6d fa ff ff call 109c48 <oproc>
10a1db: 43 inc %ebx
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
10a1dc: 39 5d e0 cmp %ebx,-0x20(%ebp)
10a1df: 75 ef jne 10a1d0 <rtems_termios_write+0x7c>
10a1e1: 8b 7d dc mov -0x24(%ebp),%edi
10a1e4: 8b 47 10 mov 0x10(%edi),%eax
oproc (*buffer++, tty);
args->bytes_moved = args->count;
10a1e7: 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);
10a1ea: 83 ec 0c sub $0xc,%esp
10a1ed: ff 76 18 pushl 0x18(%esi)
10a1f0: e8 ff 15 00 00 call 10b7f4 <rtems_semaphore_release>
return sc;
10a1f5: 83 c4 10 add $0x10,%esp
}
10a1f8: 8b 45 e4 mov -0x1c(%ebp),%eax
10a1fb: 8d 65 f4 lea -0xc(%ebp),%esp
10a1fe: 5b pop %ebx
10a1ff: 5e pop %esi
10a200: 5f pop %edi
10a201: c9 leave
10a202: c3 ret
10a203: 90 nop
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
10a204: 51 push %ecx <== NOT EXECUTED
10a205: 56 push %esi <== NOT EXECUTED
10a206: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED
10a209: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED
10a20c: e8 03 f9 ff ff call 109b14 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
10a211: 8b 47 10 mov 0x10(%edi),%eax <== NOT EXECUTED
10a214: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED
10a217: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10a21a: eb ce jmp 10a1ea <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--)
10a21c: 31 c0 xor %eax,%eax <== NOT EXECUTED
10a21e: eb c7 jmp 10a1e7 <rtems_termios_write+0x93><== NOT EXECUTED
0011871c <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
11871c: 55 push %ebp
11871d: 89 e5 mov %esp,%ebp
11871f: 83 ec 1c sub $0x1c,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
118722: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
118725: 50 push %eax
118726: ff 75 08 pushl 0x8(%ebp)
118729: 68 20 35 14 00 push $0x143520
11872e: e8 05 2c 00 00 call 11b338 <_Objects_Get>
switch ( location ) {
118733: 83 c4 10 add $0x10,%esp
118736: 8b 55 f4 mov -0xc(%ebp),%edx
118739: 85 d2 test %edx,%edx
11873b: 74 07 je 118744 <rtems_timer_cancel+0x28>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
11873d: b8 04 00 00 00 mov $0x4,%eax
}
118742: c9 leave
118743: c3 ret
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
118744: 83 78 38 04 cmpl $0x4,0x38(%eax)
118748: 74 0f je 118759 <rtems_timer_cancel+0x3d><== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
11874a: 83 ec 0c sub $0xc,%esp
11874d: 83 c0 10 add $0x10,%eax
118750: 50 push %eax
118751: e8 aa 48 00 00 call 11d000 <_Watchdog_Remove>
118756: 83 c4 10 add $0x10,%esp
_Thread_Enable_dispatch();
118759: e8 62 37 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
11875e: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118760: c9 leave
118761: c3 ret
0010c038 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
10c038: 55 push %ebp
10c039: 89 e5 mov %esp,%ebp
10c03b: 57 push %edi
10c03c: 56 push %esi
10c03d: 53 push %ebx
10c03e: 83 ec 0c sub $0xc,%esp
10c041: 8b 5d 08 mov 0x8(%ebp),%ebx
10c044: 8b 75 0c mov 0xc(%ebp),%esi
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
10c047: 85 db test %ebx,%ebx
10c049: 74 6d je 10c0b8 <rtems_timer_create+0x80>
return RTEMS_INVALID_NAME;
if ( !id )
10c04b: 85 f6 test %esi,%esi
10c04d: 0f 84 89 00 00 00 je 10c0dc <rtems_timer_create+0xa4>
10c053: a1 d0 98 12 00 mov 0x1298d0,%eax
10c058: 40 inc %eax
10c059: a3 d0 98 12 00 mov %eax,0x1298d0
* 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 );
10c05e: 83 ec 0c sub $0xc,%esp
10c061: 68 00 a3 12 00 push $0x12a300
10c066: e8 31 0f 00 00 call 10cf9c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
10c06b: 83 c4 10 add $0x10,%esp
10c06e: 85 c0 test %eax,%eax
10c070: 74 56 je 10c0c8 <rtems_timer_create+0x90>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
10c072: 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;
10c079: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10c080: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10c087: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10c08e: 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 ),
10c095: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
10c098: 0f b7 fa movzwl %dx,%edi
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10c09b: 8b 0d 1c a3 12 00 mov 0x12a31c,%ecx
10c0a1: 89 04 b9 mov %eax,(%ecx,%edi,4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
10c0a4: 89 58 0c mov %ebx,0xc(%eax)
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
10c0a7: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10c0a9: e8 2a 1f 00 00 call 10dfd8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c0ae: 31 c0 xor %eax,%eax
}
10c0b0: 8d 65 f4 lea -0xc(%ebp),%esp
10c0b3: 5b pop %ebx
10c0b4: 5e pop %esi
10c0b5: 5f pop %edi
10c0b6: c9 leave
10c0b7: c3 ret
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
10c0b8: b8 03 00 00 00 mov $0x3,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c0bd: 8d 65 f4 lea -0xc(%ebp),%esp
10c0c0: 5b pop %ebx
10c0c1: 5e pop %esi
10c0c2: 5f pop %edi
10c0c3: c9 leave
10c0c4: c3 ret
10c0c5: 8d 76 00 lea 0x0(%esi),%esi
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
10c0c8: e8 0b 1f 00 00 call 10dfd8 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
10c0cd: b8 05 00 00 00 mov $0x5,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c0d2: 8d 65 f4 lea -0xc(%ebp),%esp
10c0d5: 5b pop %ebx
10c0d6: 5e pop %esi
10c0d7: 5f pop %edi
10c0d8: c9 leave
10c0d9: c3 ret
10c0da: 66 90 xchg %ax,%ax
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
10c0dc: b8 09 00 00 00 mov $0x9,%eax
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
10c0e1: 8d 65 f4 lea -0xc(%ebp),%esp
10c0e4: 5b pop %ebx
10c0e5: 5e pop %esi
10c0e6: 5f pop %edi
10c0e7: c9 leave
10c0e8: c3 ret
00118818 <rtems_timer_delete>:
*/
rtems_status_code rtems_timer_delete(
rtems_id id
)
{
118818: 55 push %ebp
118819: 89 e5 mov %esp,%ebp
11881b: 53 push %ebx
11881c: 83 ec 18 sub $0x18,%esp
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
11881f: 8d 45 f4 lea -0xc(%ebp),%eax
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
118822: 50 push %eax
118823: ff 75 08 pushl 0x8(%ebp)
118826: 68 20 35 14 00 push $0x143520
11882b: e8 08 2b 00 00 call 11b338 <_Objects_Get>
118830: 89 c3 mov %eax,%ebx
switch ( location ) {
118832: 83 c4 10 add $0x10,%esp
118835: 8b 4d f4 mov -0xc(%ebp),%ecx
118838: 85 c9 test %ecx,%ecx
11883a: 75 38 jne 118874 <rtems_timer_delete+0x5c>
case OBJECTS_LOCAL:
_Objects_Close( &_Timer_Information, &the_timer->Object );
11883c: 83 ec 08 sub $0x8,%esp
11883f: 50 push %eax
118840: 68 20 35 14 00 push $0x143520
118845: e8 7a 26 00 00 call 11aec4 <_Objects_Close>
(void) _Watchdog_Remove( &the_timer->Ticker );
11884a: 8d 43 10 lea 0x10(%ebx),%eax
11884d: 89 04 24 mov %eax,(%esp)
118850: e8 ab 47 00 00 call 11d000 <_Watchdog_Remove>
*/
RTEMS_INLINE_ROUTINE void _Timer_Free (
Timer_Control *the_timer
)
{
_Objects_Free( &_Timer_Information, &the_timer->Object );
118855: 58 pop %eax
118856: 5a pop %edx
118857: 53 push %ebx
118858: 68 20 35 14 00 push $0x143520
11885d: e8 5a 29 00 00 call 11b1bc <_Objects_Free>
_Timer_Free( the_timer );
_Thread_Enable_dispatch();
118862: e8 59 36 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118867: 83 c4 10 add $0x10,%esp
11886a: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11886c: 8b 5d fc mov -0x4(%ebp),%ebx
11886f: c9 leave
118870: c3 ret
118871: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118874: b8 04 00 00 00 mov $0x4,%eax
}
118879: 8b 5d fc mov -0x4(%ebp),%ebx
11887c: c9 leave
11887d: c3 ret
0010c0ec <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
10c0ec: 55 push %ebp
10c0ed: 89 e5 mov %esp,%ebp
10c0ef: 57 push %edi
10c0f0: 56 push %esi
10c0f1: 53 push %ebx
10c0f2: 83 ec 2c sub $0x2c,%esp
10c0f5: 8b 5d 0c mov 0xc(%ebp),%ebx
10c0f8: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
10c0fb: 85 db test %ebx,%ebx
10c0fd: 0f 84 99 00 00 00 je 10c19c <rtems_timer_fire_after+0xb0>
return RTEMS_INVALID_NUMBER;
if ( !routine )
10c103: 85 f6 test %esi,%esi
10c105: 0f 84 b1 00 00 00 je 10c1bc <rtems_timer_fire_after+0xd0>
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
10c10b: 57 push %edi
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
10c10c: 8d 45 e4 lea -0x1c(%ebp),%eax
10c10f: 50 push %eax
10c110: ff 75 08 pushl 0x8(%ebp)
10c113: 68 00 a3 12 00 push $0x12a300
10c118: e8 33 13 00 00 call 10d450 <_Objects_Get>
10c11d: 89 c7 mov %eax,%edi
switch ( location ) {
10c11f: 83 c4 10 add $0x10,%esp
10c122: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c125: 85 c9 test %ecx,%ecx
10c127: 74 0f je 10c138 <rtems_timer_fire_after+0x4c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
10c129: b8 04 00 00 00 mov $0x4,%eax
}
10c12e: 8d 65 f4 lea -0xc(%ebp),%esp
10c131: 5b pop %ebx
10c132: 5e pop %esi
10c133: 5f pop %edi
10c134: c9 leave
10c135: c3 ret
10c136: 66 90 xchg %ax,%ax
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
10c138: 8d 50 10 lea 0x10(%eax),%edx
10c13b: 83 ec 0c sub $0xc,%esp
10c13e: 52 push %edx
10c13f: 89 55 d4 mov %edx,-0x2c(%ebp)
10c142: e8 45 2d 00 00 call 10ee8c <_Watchdog_Remove>
_ISR_Disable( level );
10c147: 9c pushf
10c148: fa cli
10c149: 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 ) {
10c14a: 83 c4 10 add $0x10,%esp
10c14d: 8b 57 18 mov 0x18(%edi),%edx
10c150: 85 d2 test %edx,%edx
10c152: 8b 55 d4 mov -0x2c(%ebp),%edx
10c155: 75 55 jne 10c1ac <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;
10c157: 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;
10c15e: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi)
the_watchdog->routine = routine;
10c165: 89 77 2c mov %esi,0x2c(%edi)
the_watchdog->id = id;
10c168: 8b 4d 08 mov 0x8(%ebp),%ecx
10c16b: 89 4f 30 mov %ecx,0x30(%edi)
the_watchdog->user_data = user_data;
10c16e: 8b 4d 14 mov 0x14(%ebp),%ecx
10c171: 89 4f 34 mov %ecx,0x34(%edi)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
10c174: 50 push %eax
10c175: 9d popf
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10c176: 89 5f 1c mov %ebx,0x1c(%edi)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10c179: 83 ec 08 sub $0x8,%esp
10c17c: 52 push %edx
10c17d: 68 a0 99 12 00 push $0x1299a0
10c182: e8 c5 2b 00 00 call 10ed4c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
10c187: e8 4c 1e 00 00 call 10dfd8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c18c: 83 c4 10 add $0x10,%esp
10c18f: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c191: 8d 65 f4 lea -0xc(%ebp),%esp
10c194: 5b pop %ebx
10c195: 5e pop %esi
10c196: 5f pop %edi
10c197: c9 leave
10c198: c3 ret
10c199: 8d 76 00 lea 0x0(%esi),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
10c19c: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
10c1a1: 8d 65 f4 lea -0xc(%ebp),%esp
10c1a4: 5b pop %ebx
10c1a5: 5e pop %esi
10c1a6: 5f pop %edi
10c1a7: c9 leave
10c1a8: c3 ret
10c1a9: 8d 76 00 lea 0x0(%esi),%esi
* 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 );
10c1ac: 50 push %eax
10c1ad: 9d popf
_Thread_Enable_dispatch();
10c1ae: e8 25 1e 00 00 call 10dfd8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
10c1b3: 31 c0 xor %eax,%eax
10c1b5: e9 74 ff ff ff jmp 10c12e <rtems_timer_fire_after+0x42>
10c1ba: 66 90 xchg %ax,%ax
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
10c1bc: b8 09 00 00 00 mov $0x9,%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
00118960 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
118960: 55 push %ebp
118961: 89 e5 mov %esp,%ebp
118963: 57 push %edi
118964: 56 push %esi
118965: 53 push %ebx
118966: 83 ec 2c sub $0x2c,%esp
118969: 8b 75 08 mov 0x8(%ebp),%esi
11896c: 8b 7d 0c mov 0xc(%ebp),%edi
11896f: 8b 5d 10 mov 0x10(%ebp),%ebx
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
118972: 80 3d 04 2b 14 00 00 cmpb $0x0,0x142b04
118979: 75 0d jne 118988 <rtems_timer_fire_when+0x28>
return RTEMS_NOT_DEFINED;
11897b: b8 0b 00 00 00 mov $0xb,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118980: 8d 65 f4 lea -0xc(%ebp),%esp
118983: 5b pop %ebx
118984: 5e pop %esi
118985: 5f pop %edi
118986: c9 leave
118987: c3 ret
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
118988: 83 ec 0c sub $0xc,%esp
11898b: 57 push %edi
11898c: e8 93 d4 ff ff call 115e24 <_TOD_Validate>
118991: 83 c4 10 add $0x10,%esp
118994: 84 c0 test %al,%al
118996: 74 1e je 1189b6 <rtems_timer_fire_when+0x56>
return RTEMS_INVALID_CLOCK;
if ( !routine )
118998: 85 db test %ebx,%ebx
11899a: 0f 84 a4 00 00 00 je 118a44 <rtems_timer_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
1189a0: 83 ec 0c sub $0xc,%esp
1189a3: 57 push %edi
1189a4: e8 ef d3 ff ff call 115d98 <_TOD_To_seconds>
1189a9: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
1189ab: 83 c4 10 add $0x10,%esp
1189ae: 3b 05 88 2b 14 00 cmp 0x142b88,%eax
1189b4: 77 0e ja 1189c4 <rtems_timer_fire_when+0x64>
return RTEMS_INVALID_CLOCK;
1189b6: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1189bb: 8d 65 f4 lea -0xc(%ebp),%esp
1189be: 5b pop %ebx
1189bf: 5e pop %esi
1189c0: 5f pop %edi
1189c1: c9 leave
1189c2: c3 ret
1189c3: 90 nop
1189c4: 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 );
1189c5: 8d 45 e4 lea -0x1c(%ebp),%eax
1189c8: 50 push %eax
1189c9: 56 push %esi
1189ca: 68 20 35 14 00 push $0x143520
1189cf: e8 64 29 00 00 call 11b338 <_Objects_Get>
switch ( location ) {
1189d4: 83 c4 10 add $0x10,%esp
1189d7: 8b 4d e4 mov -0x1c(%ebp),%ecx
1189da: 85 c9 test %ecx,%ecx
1189dc: 75 5a jne 118a38 <rtems_timer_fire_when+0xd8>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
1189de: 8d 48 10 lea 0x10(%eax),%ecx
1189e1: 83 ec 0c sub $0xc,%esp
1189e4: 51 push %ecx
1189e5: 89 45 d0 mov %eax,-0x30(%ebp)
1189e8: 89 4d d4 mov %ecx,-0x2c(%ebp)
1189eb: e8 10 46 00 00 call 11d000 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY;
1189f0: 8b 55 d0 mov -0x30(%ebp),%edx
1189f3: 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;
1189fa: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
118a01: 89 5a 2c mov %ebx,0x2c(%edx)
the_watchdog->id = id;
118a04: 89 72 30 mov %esi,0x30(%edx)
the_watchdog->user_data = user_data;
118a07: 8b 45 14 mov 0x14(%ebp),%eax
118a0a: 89 42 34 mov %eax,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
118a0d: 2b 3d 88 2b 14 00 sub 0x142b88,%edi
118a13: 89 7a 1c mov %edi,0x1c(%edx)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
118a16: 58 pop %eax
118a17: 5a pop %edx
118a18: 8b 4d d4 mov -0x2c(%ebp),%ecx
118a1b: 51 push %ecx
118a1c: 68 b4 2b 14 00 push $0x142bb4
118a21: e8 9a 44 00 00 call 11cec0 <_Watchdog_Insert>
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
118a26: e8 95 34 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118a2b: 83 c4 10 add $0x10,%esp
118a2e: 31 c0 xor %eax,%eax
118a30: e9 4b ff ff ff jmp 118980 <rtems_timer_fire_when+0x20>
118a35: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118a38: b8 04 00 00 00 mov $0x4,%eax
118a3d: e9 3e ff ff ff jmp 118980 <rtems_timer_fire_when+0x20>
118a42: 66 90 xchg %ax,%ax
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
118a44: b8 09 00 00 00 mov $0x9,%eax
118a49: e9 32 ff ff ff jmp 118980 <rtems_timer_fire_when+0x20>
001190f8 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
1190f8: 55 push %ebp
1190f9: 89 e5 mov %esp,%ebp
1190fb: 56 push %esi
1190fc: 53 push %ebx
1190fd: 83 ec 10 sub $0x10,%esp
119100: 8b 45 08 mov 0x8(%ebp),%eax
119103: 85 c0 test %eax,%eax
119105: 74 41 je 119148 <rtems_timer_initiate_server+0x50>
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
119107: 0f b6 15 94 a3 13 00 movzbl 0x13a394,%edx
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
11910e: 39 d0 cmp %edx,%eax
119110: 76 42 jbe 119154 <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 )
119112: 40 inc %eax
119113: 75 33 jne 119148 <rtems_timer_initiate_server+0x50>
return RTEMS_INVALID_PRIORITY;
_priority = 0;
119115: 31 f6 xor %esi,%esi
119117: 8b 15 f0 2a 14 00 mov 0x142af0,%edx
11911d: 42 inc %edx
11911e: 89 15 f0 2a 14 00 mov %edx,0x142af0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
119124: 8a 1d 20 e4 13 00 mov 0x13e420,%bl
initialized = true;
11912a: c6 05 20 e4 13 00 01 movb $0x1,0x13e420
_Thread_Enable_dispatch();
119131: e8 8a 2d 00 00 call 11bec0 <_Thread_Enable_dispatch>
if ( tmpInitialized )
119136: 84 db test %bl,%bl
119138: 74 1e je 119158 <rtems_timer_initiate_server+0x60>
return RTEMS_INCORRECT_STATE;
11913a: b8 0e 00 00 00 mov $0xe,%eax
initialized = false;
}
#endif
return status;
}
11913f: 8d 65 f8 lea -0x8(%ebp),%esp
119142: 5b pop %ebx
119143: 5e pop %esi
119144: c9 leave
119145: c3 ret
119146: 66 90 xchg %ax,%ax
* 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;
119148: b8 13 00 00 00 mov $0x13,%eax
initialized = false;
}
#endif
return status;
}
11914d: 8d 65 f8 lea -0x8(%ebp),%esp
119150: 5b pop %ebx
119151: 5e pop %esi
119152: c9 leave
119153: c3 ret
119154: 89 c6 mov %eax,%esi
119156: eb bf jmp 119117 <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(
119158: 83 ec 08 sub $0x8,%esp
11915b: 8d 45 f4 lea -0xc(%ebp),%eax
11915e: 50 push %eax
11915f: 8b 45 10 mov 0x10(%ebp),%eax
119162: 80 cc 80 or $0x80,%ah
119165: 50 push %eax
119166: 68 00 01 00 00 push $0x100
11916b: ff 75 0c pushl 0xc(%ebp)
11916e: 56 push %esi
11916f: 68 45 4d 49 54 push $0x54494d45
119174: e8 c7 ec ff ff call 117e40 <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) {
119179: 83 c4 20 add $0x20,%esp
11917c: 85 c0 test %eax,%eax
11917e: 74 10 je 119190 <rtems_timer_initiate_server+0x98>
initialized = false;
119180: c6 05 20 e4 13 00 00 movb $0x0,0x13e420
initialized = false;
}
#endif
return status;
}
119187: 8d 65 f8 lea -0x8(%ebp),%esp
11918a: 5b pop %ebx
11918b: 5e pop %esi
11918c: c9 leave
11918d: c3 ret
11918e: 66 90 xchg %ax,%ax
* 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)
119190: 8b 45 f4 mov -0xc(%ebp),%eax
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
119193: 0f b7 c8 movzwl %ax,%ecx
119196: 8b 15 9c 2a 14 00 mov 0x142a9c,%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(
11919c: 8b 14 8a mov (%edx,%ecx,4),%edx
11919f: 89 15 a0 e3 13 00 mov %edx,0x13e3a0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
1191a5: c7 05 d0 e3 13 00 d4 movl $0x13e3d4,0x13e3d0
1191ac: e3 13 00
head->previous = NULL;
1191af: c7 05 d4 e3 13 00 00 movl $0x0,0x13e3d4
1191b6: 00 00 00
tail->previous = head;
1191b9: c7 05 d8 e3 13 00 d0 movl $0x13e3d0,0x13e3d8
1191c0: e3 13 00
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
1191c3: c7 05 08 e4 13 00 0c movl $0x13e40c,0x13e408
1191ca: e4 13 00
head->previous = NULL;
1191cd: c7 05 0c e4 13 00 00 movl $0x0,0x13e40c
1191d4: 00 00 00
tail->previous = head;
1191d7: c7 05 10 e4 13 00 08 movl $0x13e408,0x13e410
1191de: e4 13 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1191e1: c7 05 b0 e3 13 00 00 movl $0x0,0x13e3b0
1191e8: 00 00 00
the_watchdog->routine = routine;
1191eb: c7 05 c4 e3 13 00 0c movl $0x11bd0c,0x13e3c4
1191f2: bd 11 00
the_watchdog->id = id;
1191f5: a3 c8 e3 13 00 mov %eax,0x13e3c8
the_watchdog->user_data = user_data;
1191fa: c7 05 cc e3 13 00 00 movl $0x0,0x13e3cc
119201: 00 00 00
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
119204: c7 05 e8 e3 13 00 00 movl $0x0,0x13e3e8
11920b: 00 00 00
the_watchdog->routine = routine;
11920e: c7 05 fc e3 13 00 0c movl $0x11bd0c,0x13e3fc
119215: bd 11 00
the_watchdog->id = id;
119218: a3 00 e4 13 00 mov %eax,0x13e400
the_watchdog->user_data = user_data;
11921d: c7 05 04 e4 13 00 00 movl $0x0,0x13e404
119224: 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;
119227: c7 05 a4 e3 13 00 c8 movl $0x118fc8,0x13e3a4
11922e: 8f 11 00
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
119231: 8b 15 24 2c 14 00 mov 0x142c24,%edx
119237: 89 15 dc e3 13 00 mov %edx,0x13e3dc
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
11923d: 8b 15 88 2b 14 00 mov 0x142b88,%edx
119243: 89 15 14 e4 13 00 mov %edx,0x13e414
ts->insert_chain = NULL;
119249: c7 05 18 e4 13 00 00 movl $0x0,0x13e418
119250: 00 00 00
ts->active = false;
119253: c6 05 1c e4 13 00 00 movb $0x0,0x13e41c
/*
* The default timer server is now available.
*/
_Timer_server = ts;
11925a: c7 05 60 35 14 00 a0 movl $0x13e3a0,0x143560
119261: e3 13 00
/*
* Start the timer server
*/
status = rtems_task_start(
119264: 53 push %ebx
119265: 68 a0 e3 13 00 push $0x13e3a0
11926a: 68 00 8e 11 00 push $0x118e00
11926f: 50 push %eax
119270: e8 8b f2 ff ff call 118500 <rtems_task_start>
if (status) {
initialized = false;
}
#endif
return status;
119275: 83 c4 10 add $0x10,%esp
119278: e9 d0 fe ff ff jmp 11914d <rtems_timer_initiate_server+0x55>
00118ad8 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
118ad8: 55 push %ebp
118ad9: 89 e5 mov %esp,%ebp
118adb: 56 push %esi
118adc: 53 push %ebx
118add: 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 );
118ae0: 8d 45 f4 lea -0xc(%ebp),%eax
118ae3: 50 push %eax
118ae4: ff 75 08 pushl 0x8(%ebp)
118ae7: 68 20 35 14 00 push $0x143520
118aec: e8 47 28 00 00 call 11b338 <_Objects_Get>
118af1: 89 c3 mov %eax,%ebx
switch ( location ) {
118af3: 83 c4 10 add $0x10,%esp
118af6: 8b 45 f4 mov -0xc(%ebp),%eax
118af9: 85 c0 test %eax,%eax
118afb: 74 0f je 118b0c <rtems_timer_reset+0x34>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118afd: b8 04 00 00 00 mov $0x4,%eax
}
118b02: 8d 65 f8 lea -0x8(%ebp),%esp
118b05: 5b pop %ebx
118b06: 5e pop %esi
118b07: c9 leave
118b08: c3 ret
118b09: 8d 76 00 lea 0x0(%esi),%esi
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
118b0c: 8b 43 38 mov 0x38(%ebx),%eax
118b0f: 85 c0 test %eax,%eax
118b11: 74 1d je 118b30 <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 ) {
118b13: 48 dec %eax
118b14: 74 3a je 118b50 <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;
118b16: b8 0b 00 00 00 mov $0xb,%eax
}
_Thread_Enable_dispatch();
118b1b: 89 45 e4 mov %eax,-0x1c(%ebp)
118b1e: e8 9d 33 00 00 call 11bec0 <_Thread_Enable_dispatch>
return status;
118b23: 8b 45 e4 mov -0x1c(%ebp),%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118b26: 8d 65 f8 lea -0x8(%ebp),%esp
118b29: 5b pop %ebx
118b2a: 5e pop %esi
118b2b: c9 leave
118b2c: c3 ret
118b2d: 8d 76 00 lea 0x0(%esi),%esi
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
118b30: 83 c3 10 add $0x10,%ebx
118b33: 83 ec 0c sub $0xc,%esp
118b36: 53 push %ebx
118b37: e8 c4 44 00 00 call 11d000 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
118b3c: 59 pop %ecx
118b3d: 5e pop %esi
118b3e: 53 push %ebx
118b3f: 68 c0 2b 14 00 push $0x142bc0
118b44: e8 77 43 00 00 call 11cec0 <_Watchdog_Insert>
118b49: 83 c4 10 add $0x10,%esp
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
118b4c: 31 c0 xor %eax,%eax
118b4e: eb cb jmp 118b1b <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;
118b50: 8b 35 60 35 14 00 mov 0x143560,%esi
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
118b56: 83 ec 0c sub $0xc,%esp
118b59: 8d 43 10 lea 0x10(%ebx),%eax
118b5c: 50 push %eax
118b5d: e8 9e 44 00 00 call 11d000 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
118b62: 58 pop %eax
118b63: 5a pop %edx
118b64: 53 push %ebx
118b65: 56 push %esi
118b66: ff 56 04 call *0x4(%esi)
118b69: 83 c4 10 add $0x10,%esp
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
118b6c: 31 c0 xor %eax,%eax
118b6e: eb ab jmp 118b1b <rtems_timer_reset+0x43>
00118b70 <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
118b70: 55 push %ebp
118b71: 89 e5 mov %esp,%ebp
118b73: 57 push %edi
118b74: 56 push %esi
118b75: 53 push %ebx
118b76: 83 ec 2c sub $0x2c,%esp
118b79: 8b 7d 0c mov 0xc(%ebp),%edi
118b7c: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
118b7f: 8b 1d 60 35 14 00 mov 0x143560,%ebx
if ( !timer_server )
118b85: 85 db test %ebx,%ebx
118b87: 0f 84 9f 00 00 00 je 118c2c <rtems_timer_server_fire_after+0xbc>
return RTEMS_INCORRECT_STATE;
if ( !routine )
118b8d: 85 f6 test %esi,%esi
118b8f: 0f 84 a3 00 00 00 je 118c38 <rtems_timer_server_fire_after+0xc8>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
118b95: 85 ff test %edi,%edi
118b97: 75 0f jne 118ba8 <rtems_timer_server_fire_after+0x38>
return RTEMS_INVALID_NUMBER;
118b99: b8 0a 00 00 00 mov $0xa,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118b9e: 8d 65 f4 lea -0xc(%ebp),%esp
118ba1: 5b pop %ebx
118ba2: 5e pop %esi
118ba3: 5f pop %edi
118ba4: c9 leave
118ba5: c3 ret
118ba6: 66 90 xchg %ax,%ax
118ba8: 52 push %edx
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
118ba9: 8d 45 e4 lea -0x1c(%ebp),%eax
118bac: 50 push %eax
118bad: ff 75 08 pushl 0x8(%ebp)
118bb0: 68 20 35 14 00 push $0x143520
118bb5: e8 7e 27 00 00 call 11b338 <_Objects_Get>
118bba: 89 c2 mov %eax,%edx
switch ( location ) {
118bbc: 83 c4 10 add $0x10,%esp
118bbf: 8b 45 e4 mov -0x1c(%ebp),%eax
118bc2: 85 c0 test %eax,%eax
118bc4: 75 56 jne 118c1c <rtems_timer_server_fire_after+0xac>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
118bc6: 83 ec 0c sub $0xc,%esp
118bc9: 8d 42 10 lea 0x10(%edx),%eax
118bcc: 50 push %eax
118bcd: 89 55 d4 mov %edx,-0x2c(%ebp)
118bd0: e8 2b 44 00 00 call 11d000 <_Watchdog_Remove>
_ISR_Disable( level );
118bd5: 9c pushf
118bd6: fa cli
118bd7: 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 ) {
118bd8: 83 c4 10 add $0x10,%esp
118bdb: 8b 55 d4 mov -0x2c(%ebp),%edx
118bde: 8b 4a 18 mov 0x18(%edx),%ecx
118be1: 85 c9 test %ecx,%ecx
118be3: 75 5f jne 118c44 <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;
118be5: 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;
118bec: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
118bf3: 89 72 2c mov %esi,0x2c(%edx)
the_watchdog->id = id;
118bf6: 8b 4d 08 mov 0x8(%ebp),%ecx
118bf9: 89 4a 30 mov %ecx,0x30(%edx)
the_watchdog->user_data = user_data;
118bfc: 8b 4d 14 mov 0x14(%ebp),%ecx
118bff: 89 4a 34 mov %ecx,0x34(%edx)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
118c02: 89 7a 1c mov %edi,0x1c(%edx)
_ISR_Enable( level );
118c05: 50 push %eax
118c06: 9d popf
(*timer_server->schedule_operation)( timer_server, the_timer );
118c07: 83 ec 08 sub $0x8,%esp
118c0a: 52 push %edx
118c0b: 53 push %ebx
118c0c: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
118c0f: e8 ac 32 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118c14: 83 c4 10 add $0x10,%esp
118c17: 31 c0 xor %eax,%eax
118c19: eb 83 jmp 118b9e <rtems_timer_server_fire_after+0x2e>
118c1b: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118c1c: b8 04 00 00 00 mov $0x4,%eax
}
118c21: 8d 65 f4 lea -0xc(%ebp),%esp
118c24: 5b pop %ebx
118c25: 5e pop %esi
118c26: 5f pop %edi
118c27: c9 leave
118c28: c3 ret
118c29: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
118c2c: b8 0e 00 00 00 mov $0xe,%eax
118c31: e9 68 ff ff ff jmp 118b9e <rtems_timer_server_fire_after+0x2e>
118c36: 66 90 xchg %ax,%ax
if ( !routine )
return RTEMS_INVALID_ADDRESS;
118c38: b8 09 00 00 00 mov $0x9,%eax
118c3d: e9 5c ff ff ff jmp 118b9e <rtems_timer_server_fire_after+0x2e>
118c42: 66 90 xchg %ax,%ax
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
118c44: 50 push %eax
118c45: 9d popf
_Thread_Enable_dispatch();
118c46: e8 75 32 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118c4b: 31 c0 xor %eax,%eax
118c4d: e9 4c ff ff ff jmp 118b9e <rtems_timer_server_fire_after+0x2e>
00118c54 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
118c54: 55 push %ebp
118c55: 89 e5 mov %esp,%ebp
118c57: 57 push %edi
118c58: 56 push %esi
118c59: 53 push %ebx
118c5a: 83 ec 2c sub $0x2c,%esp
118c5d: 8b 7d 0c mov 0xc(%ebp),%edi
118c60: 8b 75 10 mov 0x10(%ebp),%esi
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
118c63: 8b 1d 60 35 14 00 mov 0x143560,%ebx
if ( !timer_server )
118c69: 85 db test %ebx,%ebx
118c6b: 0f 84 d7 00 00 00 je 118d48 <rtems_timer_server_fire_when+0xf4>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
118c71: 80 3d 04 2b 14 00 00 cmpb $0x0,0x142b04
118c78: 0f 84 aa 00 00 00 je 118d28 <rtems_timer_server_fire_when+0xd4><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
118c7e: 85 f6 test %esi,%esi
118c80: 0f 84 b2 00 00 00 je 118d38 <rtems_timer_server_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
118c86: 83 ec 0c sub $0xc,%esp
118c89: 57 push %edi
118c8a: e8 95 d1 ff ff call 115e24 <_TOD_Validate>
118c8f: 83 c4 10 add $0x10,%esp
118c92: 84 c0 test %al,%al
118c94: 75 0e jne 118ca4 <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;
118c96: b8 14 00 00 00 mov $0x14,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118c9b: 8d 65 f4 lea -0xc(%ebp),%esp
118c9e: 5b pop %ebx
118c9f: 5e pop %esi
118ca0: 5f pop %edi
118ca1: c9 leave
118ca2: c3 ret
118ca3: 90 nop
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
118ca4: 83 ec 0c sub $0xc,%esp
118ca7: 57 push %edi
118ca8: e8 eb d0 ff ff call 115d98 <_TOD_To_seconds>
118cad: 89 c7 mov %eax,%edi
if ( seconds <= _TOD_Seconds_since_epoch() )
118caf: 83 c4 10 add $0x10,%esp
118cb2: 3b 05 88 2b 14 00 cmp 0x142b88,%eax
118cb8: 76 dc jbe 118c96 <rtems_timer_server_fire_when+0x42>
118cba: 52 push %edx
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
118cbb: 8d 45 e4 lea -0x1c(%ebp),%eax
118cbe: 50 push %eax
118cbf: ff 75 08 pushl 0x8(%ebp)
118cc2: 68 20 35 14 00 push $0x143520
118cc7: e8 6c 26 00 00 call 11b338 <_Objects_Get>
118ccc: 89 c2 mov %eax,%edx
switch ( location ) {
118cce: 83 c4 10 add $0x10,%esp
118cd1: 8b 45 e4 mov -0x1c(%ebp),%eax
118cd4: 85 c0 test %eax,%eax
118cd6: 75 7c jne 118d54 <rtems_timer_server_fire_when+0x100>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
118cd8: 83 ec 0c sub $0xc,%esp
118cdb: 8d 42 10 lea 0x10(%edx),%eax
118cde: 50 push %eax
118cdf: 89 55 d4 mov %edx,-0x2c(%ebp)
118ce2: e8 19 43 00 00 call 11d000 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
118ce7: 8b 55 d4 mov -0x2c(%ebp),%edx
118cea: 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;
118cf1: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx)
the_watchdog->routine = routine;
118cf8: 89 72 2c mov %esi,0x2c(%edx)
the_watchdog->id = id;
118cfb: 8b 45 08 mov 0x8(%ebp),%eax
118cfe: 89 42 30 mov %eax,0x30(%edx)
the_watchdog->user_data = user_data;
118d01: 8b 45 14 mov 0x14(%ebp),%eax
118d04: 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();
118d07: 2b 3d 88 2b 14 00 sub 0x142b88,%edi
118d0d: 89 7a 1c mov %edi,0x1c(%edx)
(*timer_server->schedule_operation)( timer_server, the_timer );
118d10: 58 pop %eax
118d11: 59 pop %ecx
118d12: 52 push %edx
118d13: 53 push %ebx
118d14: ff 53 04 call *0x4(%ebx)
_Thread_Enable_dispatch();
118d17: e8 a4 31 00 00 call 11bec0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
118d1c: 83 c4 10 add $0x10,%esp
118d1f: 31 c0 xor %eax,%eax
118d21: e9 75 ff ff ff jmp 118c9b <rtems_timer_server_fire_when+0x47>
118d26: 66 90 xchg %ax,%ax
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
118d28: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118d2d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
118d30: 5b pop %ebx <== NOT EXECUTED
118d31: 5e pop %esi <== NOT EXECUTED
118d32: 5f pop %edi <== NOT EXECUTED
118d33: c9 leave <== NOT EXECUTED
118d34: c3 ret <== NOT EXECUTED
118d35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
118d38: b8 09 00 00 00 mov $0x9,%eax
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
118d3d: 8d 65 f4 lea -0xc(%ebp),%esp
118d40: 5b pop %ebx
118d41: 5e pop %esi
118d42: 5f pop %edi
118d43: c9 leave
118d44: c3 ret
118d45: 8d 76 00 lea 0x0(%esi),%esi
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
118d48: b8 0e 00 00 00 mov $0xe,%eax
118d4d: e9 49 ff ff ff jmp 118c9b <rtems_timer_server_fire_when+0x47>
118d52: 66 90 xchg %ax,%ax
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
118d54: b8 04 00 00 00 mov $0x4,%eax
118d59: e9 3d ff ff ff jmp 118c9b <rtems_timer_server_fire_when+0x47>
0010c720 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
10c720: 55 push %ebp
10c721: 89 e5 mov %esp,%ebp
10c723: 57 push %edi
10c724: 56 push %esi
10c725: 53 push %ebx
10c726: 83 ec 1c sub $0x1c,%esp
10c729: 89 c3 mov %eax,%ebx
10c72b: 89 d6 mov %edx,%esi
10c72d: 89 cf mov %ecx,%edi
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
10c72f: a9 00 00 00 20 test $0x20000000,%eax
10c734: 74 2b je 10c761 <rtems_verror+0x41>
if (rtems_panic_in_progress++)
10c736: 8b 15 60 ea 12 00 mov 0x12ea60,%edx
10c73c: 8d 42 01 lea 0x1(%edx),%eax
10c73f: a3 60 ea 12 00 mov %eax,0x12ea60
10c744: 85 d2 test %edx,%edx
10c746: 74 10 je 10c758 <rtems_verror+0x38> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10c748: a1 d0 eb 12 00 mov 0x12ebd0,%eax <== NOT EXECUTED
10c74d: 40 inc %eax <== NOT EXECUTED
10c74e: a3 d0 eb 12 00 mov %eax,0x12ebd0 <== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
10c753: a1 60 ea 12 00 mov 0x12ea60,%eax <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
10c758: 83 f8 02 cmp $0x2,%eax
10c75b: 0f 8f af 00 00 00 jg 10c810 <rtems_verror+0xf0> <== NEVER TAKEN
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
10c761: 83 ec 0c sub $0xc,%esp
10c764: a1 e0 c7 12 00 mov 0x12c7e0,%eax
10c769: ff 70 08 pushl 0x8(%eax)
10c76c: e8 d3 c0 00 00 call 118844 <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
10c771: 89 d8 mov %ebx,%eax
10c773: 25 ff ff ff 8f and $0x8fffffff,%eax
10c778: 89 45 e4 mov %eax,-0x1c(%ebp)
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
10c77b: 83 c4 10 add $0x10,%esp
10c77e: 81 e3 00 00 00 40 and $0x40000000,%ebx
10c784: 0f 85 be 00 00 00 jne 10c848 <rtems_verror+0x128>
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
10c78a: 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);
10c78c: 50 push %eax
10c78d: 57 push %edi
10c78e: 56 push %esi
10c78f: a1 e0 c7 12 00 mov 0x12c7e0,%eax
10c794: ff 70 0c pushl 0xc(%eax)
10c797: e8 68 25 01 00 call 11ed04 <vfprintf>
10c79c: 89 c6 mov %eax,%esi
if (status)
10c79e: 83 c4 10 add $0x10,%esp
10c7a1: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c7a4: 85 c9 test %ecx,%ecx
10c7a6: 75 74 jne 10c81c <rtems_verror+0xfc>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
10c7a8: 83 fb 00 cmp $0x0,%ebx
10c7ab: 74 30 je 10c7dd <rtems_verror+0xbd>
if ((local_errno > 0) && *strerror(local_errno))
10c7ad: 7e 15 jle 10c7c4 <rtems_verror+0xa4>
10c7af: 83 ec 0c sub $0xc,%esp
10c7b2: 53 push %ebx
10c7b3: e8 d4 cc 00 00 call 11948c <strerror>
10c7b8: 83 c4 10 add $0x10,%esp
10c7bb: 80 38 00 cmpb $0x0,(%eax)
10c7be: 0f 85 90 00 00 00 jne 10c854 <rtems_verror+0x134> <== ALWAYS TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
10c7c4: 52 push %edx
10c7c5: 53 push %ebx
10c7c6: 68 29 73 12 00 push $0x127329
10c7cb: a1 e0 c7 12 00 mov 0x12c7e0,%eax
10c7d0: ff 70 0c pushl 0xc(%eax)
10c7d3: e8 60 c4 00 00 call 118c38 <fprintf>
10c7d8: 01 c6 add %eax,%esi
10c7da: 83 c4 10 add $0x10,%esp
}
chars_written += fprintf(stderr, "\n");
10c7dd: 83 ec 08 sub $0x8,%esp
10c7e0: 68 a2 65 12 00 push $0x1265a2
10c7e5: a1 e0 c7 12 00 mov 0x12c7e0,%eax
10c7ea: ff 70 0c pushl 0xc(%eax)
10c7ed: e8 46 c4 00 00 call 118c38 <fprintf>
10c7f2: 8d 34 30 lea (%eax,%esi,1),%esi
(void) fflush(stderr);
10c7f5: 58 pop %eax
10c7f6: a1 e0 c7 12 00 mov 0x12c7e0,%eax
10c7fb: ff 70 0c pushl 0xc(%eax)
10c7fe: e8 41 c0 00 00 call 118844 <fflush>
return chars_written;
10c803: 83 c4 10 add $0x10,%esp
}
10c806: 89 f0 mov %esi,%eax
10c808: 8d 65 f4 lea -0xc(%ebp),%esp
10c80b: 5b pop %ebx
10c80c: 5e pop %esi
10c80d: 5f pop %edi
10c80e: c9 leave
10c80f: 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;
10c810: 31 f6 xor %esi,%esi
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
return chars_written;
}
10c812: 89 f0 mov %esi,%eax <== NOT EXECUTED
10c814: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10c817: 5b pop %ebx <== NOT EXECUTED
10c818: 5e pop %esi <== NOT EXECUTED
10c819: 5f pop %edi <== NOT EXECUTED
10c81a: c9 leave <== NOT EXECUTED
10c81b: c3 ret <== NOT EXECUTED
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
10c81c: 83 ec 0c sub $0xc,%esp
10c81f: ff 75 e4 pushl -0x1c(%ebp)
10c822: e8 e1 fe ff ff call 10c708 <rtems_status_text>
10c827: 83 c4 0c add $0xc,%esp
10c82a: 50 push %eax
10c82b: 68 0e 73 12 00 push $0x12730e
10c830: a1 e0 c7 12 00 mov 0x12c7e0,%eax
10c835: ff 70 0c pushl 0xc(%eax)
10c838: e8 fb c3 00 00 call 118c38 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
10c83d: 01 c6 add %eax,%esi
10c83f: 83 c4 10 add $0x10,%esp
10c842: e9 61 ff ff ff jmp 10c7a8 <rtems_verror+0x88>
10c847: 90 nop
(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;
10c848: e8 5f bc 00 00 call 1184ac <__errno>
10c84d: 8b 18 mov (%eax),%ebx
10c84f: e9 38 ff ff ff jmp 10c78c <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));
10c854: 83 ec 0c sub $0xc,%esp
10c857: 53 push %ebx
10c858: e8 2f cc 00 00 call 11948c <strerror>
10c85d: 83 c4 0c add $0xc,%esp
10c860: 50 push %eax
10c861: 68 1c 73 12 00 push $0x12731c
10c866: e9 60 ff ff ff jmp 10c7cb <rtems_verror+0xab>
001086d4 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
1086d4: 55 push %ebp
1086d5: 89 e5 mov %esp,%ebp
1086d7: 57 push %edi
1086d8: 56 push %esi
1086d9: 53 push %ebx
1086da: 83 ec 1c sub $0x1c,%esp
1086dd: 89 c6 mov %eax,%esi
1086df: 89 55 e0 mov %edx,-0x20(%ebp)
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
1086e2: 31 ff xor %edi,%edi
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
1086e4: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp)
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
1086eb: 31 db xor %ebx,%ebx
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
1086ed: 8b 46 04 mov 0x4(%esi),%eax
1086f0: 48 dec %eax
1086f1: 89 46 04 mov %eax,0x4(%esi)
1086f4: 85 c0 test %eax,%eax
1086f6: 78 52 js 10874a <scanInt+0x76> <== NEVER TAKEN
1086f8: 8b 06 mov (%esi),%eax
1086fa: 0f b6 08 movzbl (%eax),%ecx
1086fd: 40 inc %eax
1086fe: 89 06 mov %eax,(%esi)
if (c == ':')
108700: 83 f9 3a cmp $0x3a,%ecx
108703: 74 5f je 108764 <scanInt+0x90>
break;
if (sign == 0) {
108705: 85 ff test %edi,%edi
108707: 75 0e jne 108717 <scanInt+0x43>
if (c == '-') {
108709: 83 f9 2d cmp $0x2d,%ecx
10870c: 0f 84 8a 00 00 00 je 10879c <scanInt+0xc8>
sign = -1;
limit++;
continue;
}
sign = 1;
108712: bf 01 00 00 00 mov $0x1,%edi
}
if (!isdigit(c))
108717: a1 34 75 12 00 mov 0x127534,%eax
10871c: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1)
108721: 74 6d je 108790 <scanInt+0xbc>
return 0;
d = c - '0';
if ((i > (limit / 10))
108723: b8 cd cc cc cc mov $0xcccccccd,%eax
108728: f7 65 e4 mull -0x1c(%ebp)
10872b: c1 ea 03 shr $0x3,%edx
10872e: 39 d3 cmp %edx,%ebx
108730: 77 5e ja 108790 <scanInt+0xbc>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
108732: 83 e9 30 sub $0x30,%ecx
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
108735: 39 d3 cmp %edx,%ebx
108737: 74 47 je 108780 <scanInt+0xac>
return 0;
i = i * 10 + d;
108739: 8d 04 9b lea (%ebx,%ebx,4),%eax
10873c: 8d 1c 41 lea (%ecx,%eax,2),%ebx
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
10873f: 8b 46 04 mov 0x4(%esi),%eax
108742: 48 dec %eax
108743: 89 46 04 mov %eax,0x4(%esi)
108746: 85 c0 test %eax,%eax
108748: 79 ae jns 1086f8 <scanInt+0x24> <== ALWAYS TAKEN
10874a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED
10874d: 56 push %esi <== NOT EXECUTED
10874e: ff 35 40 75 12 00 pushl 0x127540 <== NOT EXECUTED
108754: e8 b7 cd 00 00 call 115510 <__srget_r> <== NOT EXECUTED
108759: 89 c1 mov %eax,%ecx <== NOT EXECUTED
10875b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
if (c == ':')
10875e: 83 f9 3a cmp $0x3a,%ecx <== NOT EXECUTED
108761: 75 a2 jne 108705 <scanInt+0x31> <== NOT EXECUTED
108763: 90 nop <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
108764: 85 ff test %edi,%edi
108766: 74 28 je 108790 <scanInt+0xbc> <== NEVER TAKEN
return 0;
*val = i * sign;
108768: 0f af df imul %edi,%ebx
10876b: 8b 45 e0 mov -0x20(%ebp),%eax
10876e: 89 18 mov %ebx,(%eax)
return 1;
108770: b8 01 00 00 00 mov $0x1,%eax
}
108775: 8d 65 f4 lea -0xc(%ebp),%esp
108778: 5b pop %ebx
108779: 5e pop %esi
10877a: 5f pop %edi
10877b: c9 leave
10877c: c3 ret
10877d: 8d 76 00 lea 0x0(%esi),%esi
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
108780: 8d 04 9b lea (%ebx,%ebx,4),%eax
108783: d1 e0 shl %eax
108785: 8b 55 e4 mov -0x1c(%ebp),%edx
108788: 29 c2 sub %eax,%edx
10878a: 39 d1 cmp %edx,%ecx
10878c: 76 ab jbe 108739 <scanInt+0x65> <== NEVER TAKEN
10878e: 66 90 xchg %ax,%ax
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
108790: 31 c0 xor %eax,%eax
*val = i * sign;
return 1;
}
108792: 8d 65 f4 lea -0xc(%ebp),%esp
108795: 5b pop %ebx
108796: 5e pop %esi
108797: 5f pop %edi
108798: c9 leave
108799: c3 ret
10879a: 66 90 xchg %ax,%ax
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
10879c: ff 45 e4 incl -0x1c(%ebp)
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
10879f: bf ff ff ff ff mov $0xffffffff,%edi
limit++;
continue;
1087a4: e9 44 ff ff ff jmp 1086ed <scanInt+0x19>
001087ac <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
1087ac: 55 push %ebp
1087ad: 89 e5 mov %esp,%ebp
1087af: 57 push %edi
1087b0: 56 push %esi
1087b1: 53 push %ebx
1087b2: 83 ec 0c sub $0xc,%esp
1087b5: 89 c3 mov %eax,%ebx
1087b7: 89 ce mov %ecx,%esi
1087b9: 8b 7d 08 mov 0x8(%ebp),%edi
int c;
*name = *bufp;
1087bc: 8b 01 mov (%ecx),%eax
1087be: 89 02 mov %eax,(%edx)
1087c0: eb 26 jmp 1087e8 <scanString+0x3c>
1087c2: 66 90 xchg %ax,%ax
for (;;) {
c = getc(fp);
1087c4: 8b 13 mov (%ebx),%edx
1087c6: 0f b6 02 movzbl (%edx),%eax
1087c9: 42 inc %edx
1087ca: 89 13 mov %edx,(%ebx)
if (c == ':') {
1087cc: 83 f8 3a cmp $0x3a,%eax
1087cf: 74 3b je 10880c <scanString+0x60>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
1087d1: 83 f8 0a cmp $0xa,%eax
1087d4: 74 56 je 10882c <scanString+0x80>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
1087d6: 83 f8 ff cmp $0xffffffff,%eax
1087d9: 74 59 je 108834 <scanString+0x88>
return 0;
if (*nleft < 2)
1087db: 83 3f 01 cmpl $0x1,(%edi)
1087de: 76 54 jbe 108834 <scanString+0x88>
return 0;
**bufp = c;
1087e0: 8b 16 mov (%esi),%edx
1087e2: 88 02 mov %al,(%edx)
++(*bufp);
1087e4: ff 06 incl (%esi)
--(*nleft);
1087e6: ff 0f decl (%edi)
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
1087e8: 8b 43 04 mov 0x4(%ebx),%eax
1087eb: 48 dec %eax
1087ec: 89 43 04 mov %eax,0x4(%ebx)
1087ef: 85 c0 test %eax,%eax
1087f1: 79 d1 jns 1087c4 <scanString+0x18>
1087f3: 83 ec 08 sub $0x8,%esp
1087f6: 53 push %ebx
1087f7: ff 35 40 75 12 00 pushl 0x127540
1087fd: e8 0e cd 00 00 call 115510 <__srget_r>
108802: 83 c4 10 add $0x10,%esp
if (c == ':') {
108805: 83 f8 3a cmp $0x3a,%eax
108808: 75 c7 jne 1087d1 <scanString+0x25> <== ALWAYS TAKEN
10880a: 66 90 xchg %ax,%ax
if (nlFlag)
10880c: 8b 55 0c mov 0xc(%ebp),%edx
10880f: 85 d2 test %edx,%edx
108811: 75 21 jne 108834 <scanString+0x88>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
108813: 8b 06 mov (%esi),%eax
108815: c6 00 00 movb $0x0,(%eax)
++(*bufp);
108818: ff 06 incl (%esi)
--(*nleft);
10881a: ff 0f decl (%edi)
return 1;
10881c: b8 01 00 00 00 mov $0x1,%eax
}
108821: 8d 65 f4 lea -0xc(%ebp),%esp
108824: 5b pop %ebx
108825: 5e pop %esi
108826: 5f pop %edi
108827: c9 leave
108828: c3 ret
108829: 8d 76 00 lea 0x0(%esi),%esi
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
10882c: 8b 45 0c mov 0xc(%ebp),%eax
10882f: 85 c0 test %eax,%eax
108831: 75 e0 jne 108813 <scanString+0x67>
108833: 90 nop
break;
}
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
108834: 31 c0 xor %eax,%eax
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
108836: 8d 65 f4 lea -0xc(%ebp),%esp
108839: 5b pop %ebx
10883a: 5e pop %esi
10883b: 5f pop %edi
10883c: c9 leave
10883d: c3 ret
00108840 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
108840: 55 push %ebp
108841: 89 e5 mov %esp,%ebp
108843: 57 push %edi
108844: 56 push %esi
108845: 53 push %ebx
108846: 83 ec 34 sub $0x34,%esp
108849: 89 c6 mov %eax,%esi
10884b: 89 d3 mov %edx,%ebx
10884d: 89 4d d4 mov %ecx,-0x2c(%ebp)
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
108850: 8d 7d d4 lea -0x2c(%ebp),%edi
108853: 6a 00 push $0x0
108855: 8d 45 08 lea 0x8(%ebp),%eax
108858: 50 push %eax
108859: 89 f9 mov %edi,%ecx
10885b: 89 f0 mov %esi,%eax
10885d: e8 4a ff ff ff call 1087ac <scanString>
108862: 83 c4 10 add $0x10,%esp
108865: 85 c0 test %eax,%eax
108867: 75 0b jne 108874 <scangr+0x34>
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
108869: 31 c0 xor %eax,%eax
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
10886b: 8d 65 f4 lea -0xc(%ebp),%esp
10886e: 5b pop %ebx
10886f: 5e pop %esi
108870: 5f pop %edi
108871: c9 leave
108872: c3 ret
108873: 90 nop
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
108874: 83 ec 08 sub $0x8,%esp
108877: 8d 53 04 lea 0x4(%ebx),%edx
10887a: 6a 00 push $0x0
10887c: 8d 45 08 lea 0x8(%ebp),%eax
10887f: 50 push %eax
108880: 89 f9 mov %edi,%ecx
108882: 89 f0 mov %esi,%eax
108884: e8 23 ff ff ff call 1087ac <scanString>
108889: 83 c4 10 add $0x10,%esp
10888c: 85 c0 test %eax,%eax
10888e: 74 d9 je 108869 <scangr+0x29> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
108890: 8d 55 e4 lea -0x1c(%ebp),%edx
108893: 89 f0 mov %esi,%eax
108895: e8 3a fe ff ff call 1086d4 <scanInt>
10889a: 85 c0 test %eax,%eax
10889c: 74 cb je 108869 <scangr+0x29> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
10889e: 83 ec 08 sub $0x8,%esp
1088a1: 8d 55 e0 lea -0x20(%ebp),%edx
1088a4: 6a 01 push $0x1
1088a6: 8d 45 08 lea 0x8(%ebp),%eax
1088a9: 50 push %eax
1088aa: 89 f9 mov %edi,%ecx
1088ac: 89 f0 mov %esi,%eax
1088ae: e8 f9 fe ff ff call 1087ac <scanString>
1088b3: 83 c4 10 add $0x10,%esp
1088b6: 85 c0 test %eax,%eax
1088b8: 74 af je 108869 <scangr+0x29> <== NEVER TAKEN
return 0;
grp->gr_gid = grgid;
1088ba: 8b 45 e4 mov -0x1c(%ebp),%eax
1088bd: 66 89 43 08 mov %ax,0x8(%ebx)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
1088c1: 8b 7d e0 mov -0x20(%ebp),%edi
1088c4: 8a 07 mov (%edi),%al
1088c6: 84 c0 test %al,%al
1088c8: 74 7d je 108947 <scangr+0x107> <== NEVER TAKEN
1088ca: 89 fa mov %edi,%edx
1088cc: b9 01 00 00 00 mov $0x1,%ecx
1088d1: eb 08 jmp 1088db <scangr+0x9b>
1088d3: 90 nop
1088d4: 42 inc %edx
1088d5: 8a 02 mov (%edx),%al
1088d7: 84 c0 test %al,%al
1088d9: 74 09 je 1088e4 <scangr+0xa4>
if(*cp == ',')
1088db: 3c 2c cmp $0x2c,%al
1088dd: 75 f5 jne 1088d4 <scangr+0x94>
memcount++;
1088df: 41 inc %ecx
1088e0: eb f2 jmp 1088d4 <scangr+0x94>
1088e2: 66 90 xchg %ax,%ax
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
1088e4: 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))
1088eb: 39 45 08 cmp %eax,0x8(%ebp)
1088ee: 0f 82 75 ff ff ff jb 108869 <scangr+0x29> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
1088f4: 8b 75 d4 mov -0x2c(%ebp),%esi
1088f7: 83 c6 0f add $0xf,%esi
1088fa: 83 e6 f0 and $0xfffffff0,%esi
1088fd: 89 73 0c mov %esi,0xc(%ebx)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
108900: 89 3e mov %edi,(%esi)
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
108902: 8b 45 e0 mov -0x20(%ebp),%eax
108905: 8a 10 mov (%eax),%dl
108907: 84 d2 test %dl,%dl
108909: 74 43 je 10894e <scangr+0x10e> <== NEVER TAKEN
}
/*
* Extract a single group record from the database
*/
static int scangr(
10890b: 40 inc %eax
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
10890c: b9 01 00 00 00 mov $0x1,%ecx
108911: eb 08 jmp 10891b <scangr+0xdb>
108913: 90 nop
108914: 8a 10 mov (%eax),%dl
108916: 40 inc %eax
108917: 84 d2 test %dl,%dl
108919: 74 15 je 108930 <scangr+0xf0>
if(*cp == ',') {
10891b: 80 fa 2c cmp $0x2c,%dl
10891e: 75 f4 jne 108914 <scangr+0xd4>
*cp = '\0';
108920: c6 40 ff 00 movb $0x0,-0x1(%eax)
grp->gr_mem[memcount++] = cp + 1;
108924: 8b 53 0c mov 0xc(%ebx),%edx
108927: 89 04 8a mov %eax,(%edx,%ecx,4)
10892a: 41 inc %ecx
10892b: eb e7 jmp 108914 <scangr+0xd4>
10892d: 8d 76 00 lea 0x0(%esi),%esi
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
108930: 8b 73 0c mov 0xc(%ebx),%esi
108933: c1 e1 02 shl $0x2,%ecx
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
108936: c7 04 0e 00 00 00 00 movl $0x0,(%esi,%ecx,1)
return 1;
10893d: b8 01 00 00 00 mov $0x1,%eax
108942: e9 24 ff ff ff jmp 10886b <scangr+0x2b>
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
108947: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED
10894c: eb 9d jmp 1088eb <scangr+0xab> <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
10894e: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED
108953: eb e1 jmp 108936 <scangr+0xf6> <== NOT EXECUTED
00108958 <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
108958: 55 push %ebp
108959: 89 e5 mov %esp,%ebp
10895b: 57 push %edi
10895c: 56 push %esi
10895d: 53 push %ebx
10895e: 83 ec 34 sub $0x34,%esp
108961: 89 c6 mov %eax,%esi
108963: 89 d3 mov %edx,%ebx
108965: 89 4d d4 mov %ecx,-0x2c(%ebp)
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
108968: 8d 7d d4 lea -0x2c(%ebp),%edi
10896b: 6a 00 push $0x0
10896d: 8d 45 08 lea 0x8(%ebp),%eax
108970: 50 push %eax
108971: 89 f9 mov %edi,%ecx
108973: 89 f0 mov %esi,%eax
108975: e8 32 fe ff ff call 1087ac <scanString>
10897a: 83 c4 10 add $0x10,%esp
10897d: 85 c0 test %eax,%eax
10897f: 75 0b jne 10898c <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;
108981: 31 c0 xor %eax,%eax
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
}
108983: 8d 65 f4 lea -0xc(%ebp),%esp
108986: 5b pop %ebx
108987: 5e pop %esi
108988: 5f pop %edi
108989: c9 leave
10898a: c3 ret
10898b: 90 nop
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
10898c: 83 ec 08 sub $0x8,%esp
10898f: 8d 53 04 lea 0x4(%ebx),%edx
108992: 6a 00 push $0x0
108994: 8d 45 08 lea 0x8(%ebp),%eax
108997: 50 push %eax
108998: 89 f9 mov %edi,%ecx
10899a: 89 f0 mov %esi,%eax
10899c: e8 0b fe ff ff call 1087ac <scanString>
1089a1: 83 c4 10 add $0x10,%esp
1089a4: 85 c0 test %eax,%eax
1089a6: 74 d9 je 108981 <scanpw+0x29> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
1089a8: 8d 55 e4 lea -0x1c(%ebp),%edx
1089ab: 89 f0 mov %esi,%eax
1089ad: e8 22 fd ff ff call 1086d4 <scanInt>
1089b2: 85 c0 test %eax,%eax
1089b4: 74 cb je 108981 <scanpw+0x29>
|| !scanInt(fp, &pwgid)
1089b6: 8d 55 e0 lea -0x20(%ebp),%edx
1089b9: 89 f0 mov %esi,%eax
1089bb: e8 14 fd ff ff call 1086d4 <scanInt>
1089c0: 85 c0 test %eax,%eax
1089c2: 74 bd je 108981 <scanpw+0x29>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
1089c4: 83 ec 08 sub $0x8,%esp
1089c7: 8d 53 0c lea 0xc(%ebx),%edx
1089ca: 6a 00 push $0x0
1089cc: 8d 45 08 lea 0x8(%ebp),%eax
1089cf: 50 push %eax
1089d0: 89 f9 mov %edi,%ecx
1089d2: 89 f0 mov %esi,%eax
1089d4: e8 d3 fd ff ff call 1087ac <scanString>
1089d9: 83 c4 10 add $0x10,%esp
1089dc: 85 c0 test %eax,%eax
1089de: 74 a1 je 108981 <scanpw+0x29> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
1089e0: 83 ec 08 sub $0x8,%esp
1089e3: 8d 53 10 lea 0x10(%ebx),%edx
1089e6: 6a 00 push $0x0
1089e8: 8d 45 08 lea 0x8(%ebp),%eax
1089eb: 50 push %eax
1089ec: 89 f9 mov %edi,%ecx
1089ee: 89 f0 mov %esi,%eax
1089f0: e8 b7 fd ff ff call 1087ac <scanString>
1089f5: 83 c4 10 add $0x10,%esp
1089f8: 85 c0 test %eax,%eax
1089fa: 74 85 je 108981 <scanpw+0x29> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
1089fc: 83 ec 08 sub $0x8,%esp
1089ff: 8d 53 14 lea 0x14(%ebx),%edx
108a02: 6a 00 push $0x0
108a04: 8d 45 08 lea 0x8(%ebp),%eax
108a07: 50 push %eax
108a08: 89 f9 mov %edi,%ecx
108a0a: 89 f0 mov %esi,%eax
108a0c: e8 9b fd ff ff call 1087ac <scanString>
108a11: 83 c4 10 add $0x10,%esp
108a14: 85 c0 test %eax,%eax
108a16: 0f 84 65 ff ff ff je 108981 <scanpw+0x29> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
108a1c: 83 ec 08 sub $0x8,%esp
108a1f: 8d 53 18 lea 0x18(%ebx),%edx
108a22: 6a 01 push $0x1
108a24: 8d 45 08 lea 0x8(%ebp),%eax
108a27: 50 push %eax
108a28: 89 f9 mov %edi,%ecx
108a2a: 89 f0 mov %esi,%eax
108a2c: e8 7b fd ff ff call 1087ac <scanString>
108a31: 83 c4 10 add $0x10,%esp
108a34: 85 c0 test %eax,%eax
108a36: 0f 84 45 ff ff ff je 108981 <scanpw+0x29>
return 0;
pwd->pw_uid = pwuid;
108a3c: 8b 45 e4 mov -0x1c(%ebp),%eax
108a3f: 66 89 43 08 mov %ax,0x8(%ebx)
pwd->pw_gid = pwgid;
108a43: 8b 45 e0 mov -0x20(%ebp),%eax
108a46: 66 89 43 0a mov %ax,0xa(%ebx)
return 1;
108a4a: b8 01 00 00 00 mov $0x1,%eax
108a4f: e9 2f ff ff ff jmp 108983 <scanpw+0x2b>
0010be7c <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
10be7c: 55 push %ebp
10be7d: 89 e5 mov %esp,%ebp
10be7f: 83 ec 08 sub $0x8,%esp
10be82: 8b 45 08 mov 0x8(%ebp),%eax
switch ( policy ) {
10be85: 85 c0 test %eax,%eax
10be87: 78 0a js 10be93 <sched_get_priority_max+0x17>
10be89: 83 f8 02 cmp $0x2,%eax
10be8c: 7e 1a jle 10bea8 <sched_get_priority_max+0x2c>
10be8e: 83 f8 04 cmp $0x4,%eax
10be91: 74 15 je 10bea8 <sched_get_priority_max+0x2c><== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10be93: e8 3c 81 00 00 call 113fd4 <__errno>
10be98: c7 00 16 00 00 00 movl $0x16,(%eax)
10be9e: b8 ff ff ff ff mov $0xffffffff,%eax
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
10bea3: c9 leave
10bea4: c3 ret
10bea5: 8d 76 00 lea 0x0(%esi),%esi
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
10bea8: 0f b6 05 3c 4e 12 00 movzbl 0x124e3c,%eax
10beaf: 48 dec %eax
}
10beb0: c9 leave
10beb1: c3 ret
0010beb4 <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
10beb4: 55 push %ebp
10beb5: 89 e5 mov %esp,%ebp
10beb7: 83 ec 08 sub $0x8,%esp
10beba: 8b 45 08 mov 0x8(%ebp),%eax
switch ( policy ) {
10bebd: 85 c0 test %eax,%eax
10bebf: 78 0a js 10becb <sched_get_priority_min+0x17>
10bec1: 83 f8 02 cmp $0x2,%eax
10bec4: 7e 1a jle 10bee0 <sched_get_priority_min+0x2c><== ALWAYS TAKEN
10bec6: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED
10bec9: 74 15 je 10bee0 <sched_get_priority_min+0x2c><== NOT EXECUTED
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
10becb: e8 04 81 00 00 call 113fd4 <__errno>
10bed0: c7 00 16 00 00 00 movl $0x16,(%eax)
10bed6: b8 ff ff ff ff mov $0xffffffff,%eax
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
10bedb: c9 leave
10bedc: c3 ret
10bedd: 8d 76 00 lea 0x0(%esi),%esi
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
10bee0: b8 01 00 00 00 mov $0x1,%eax
}
10bee5: c9 leave
10bee6: c3 ret
0010bee8 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
10bee8: 55 push %ebp
10bee9: 89 e5 mov %esp,%ebp
10beeb: 56 push %esi
10beec: 53 push %ebx
10beed: 8b 75 08 mov 0x8(%ebp),%esi
10bef0: 8b 5d 0c mov 0xc(%ebp),%ebx
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10bef3: 85 f6 test %esi,%esi
10bef5: 75 21 jne 10bf18 <sched_rr_get_interval+0x30><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
10bef7: 85 db test %ebx,%ebx
10bef9: 74 38 je 10bf33 <sched_rr_get_interval+0x4b>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
10befb: 83 ec 08 sub $0x8,%esp
10befe: 53 push %ebx
10beff: ff 35 00 91 12 00 pushl 0x129100
10bf05: e8 c6 35 00 00 call 10f4d0 <_Timespec_From_ticks>
return 0;
10bf0a: 83 c4 10 add $0x10,%esp
10bf0d: 31 c0 xor %eax,%eax
}
10bf0f: 8d 65 f8 lea -0x8(%ebp),%esp
10bf12: 5b pop %ebx
10bf13: 5e pop %esi
10bf14: c9 leave
10bf15: c3 ret
10bf16: 66 90 xchg %ax,%ax
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
10bf18: e8 d3 c8 ff ff call 1087f0 <getpid>
10bf1d: 39 f0 cmp %esi,%eax
10bf1f: 74 d6 je 10bef7 <sched_rr_get_interval+0xf>
rtems_set_errno_and_return_minus_one( ESRCH );
10bf21: e8 ae 80 00 00 call 113fd4 <__errno>
10bf26: c7 00 03 00 00 00 movl $0x3,(%eax)
10bf2c: b8 ff ff ff ff mov $0xffffffff,%eax
10bf31: eb dc jmp 10bf0f <sched_rr_get_interval+0x27>
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10bf33: e8 9c 80 00 00 call 113fd4 <__errno>
10bf38: c7 00 16 00 00 00 movl $0x16,(%eax)
10bf3e: b8 ff ff ff ff mov $0xffffffff,%eax
10bf43: eb ca jmp 10bf0f <sched_rr_get_interval+0x27>
0010e64c <sem_close>:
*/
int sem_close(
sem_t *sem
)
{
10e64c: 55 push %ebp
10e64d: 89 e5 mov %esp,%ebp
10e64f: 83 ec 1c sub $0x1c,%esp
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
10e652: 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 );
10e655: 50 push %eax
10e656: 8b 45 08 mov 0x8(%ebp),%eax
10e659: ff 30 pushl (%eax)
10e65b: 68 e0 de 12 00 push $0x12dee0
10e660: e8 bf 21 00 00 call 110824 <_Objects_Get>
switch ( location ) {
10e665: 83 c4 10 add $0x10,%esp
10e668: 8b 55 f4 mov -0xc(%ebp),%edx
10e66b: 85 d2 test %edx,%edx
10e66d: 74 15 je 10e684 <sem_close+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10e66f: e8 a8 8f 00 00 call 11761c <__errno>
10e674: c7 00 16 00 00 00 movl $0x16,(%eax)
10e67a: b8 ff ff ff ff mov $0xffffffff,%eax
}
10e67f: c9 leave
10e680: c3 ret
10e681: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_semaphore->open_count -= 1;
10e684: ff 48 18 decl 0x18(%eax)
_POSIX_Semaphore_Delete( the_semaphore );
10e687: 83 ec 0c sub $0xc,%esp
10e68a: 50 push %eax
10e68b: e8 54 64 00 00 call 114ae4 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10e690: e8 97 2d 00 00 call 11142c <_Thread_Enable_dispatch>
return 0;
10e695: 83 c4 10 add $0x10,%esp
10e698: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e69a: c9 leave
10e69b: c3 ret
0010e69c <sem_destroy>:
*/
int sem_destroy(
sem_t *sem
)
{
10e69c: 55 push %ebp
10e69d: 89 e5 mov %esp,%ebp
10e69f: 83 ec 1c sub $0x1c,%esp
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
10e6a2: 8d 45 f4 lea -0xc(%ebp),%eax
10e6a5: 50 push %eax
10e6a6: 8b 45 08 mov 0x8(%ebp),%eax
10e6a9: ff 30 pushl (%eax)
10e6ab: 68 e0 de 12 00 push $0x12dee0
10e6b0: e8 6f 21 00 00 call 110824 <_Objects_Get>
switch ( location ) {
10e6b5: 83 c4 10 add $0x10,%esp
10e6b8: 8b 55 f4 mov -0xc(%ebp),%edx
10e6bb: 85 d2 test %edx,%edx
10e6bd: 74 15 je 10e6d4 <sem_destroy+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10e6bf: e8 58 8f 00 00 call 11761c <__errno>
10e6c4: c7 00 16 00 00 00 movl $0x16,(%eax)
10e6ca: b8 ff ff ff ff mov $0xffffffff,%eax
}
10e6cf: c9 leave
10e6d0: c3 ret
10e6d1: 8d 76 00 lea 0x0(%esi),%esi
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
10e6d4: 80 78 14 00 cmpb $0x0,0x14(%eax)
10e6d8: 75 16 jne 10e6f0 <sem_destroy+0x54>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
10e6da: 83 ec 0c sub $0xc,%esp
10e6dd: 50 push %eax
10e6de: e8 01 64 00 00 call 114ae4 <_POSIX_Semaphore_Delete>
_Thread_Enable_dispatch();
10e6e3: e8 44 2d 00 00 call 11142c <_Thread_Enable_dispatch>
return 0;
10e6e8: 83 c4 10 add $0x10,%esp
10e6eb: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e6ed: c9 leave
10e6ee: c3 ret
10e6ef: 90 nop
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == true ) {
_Thread_Enable_dispatch();
10e6f0: e8 37 2d 00 00 call 11142c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EINVAL );
10e6f5: e8 22 8f 00 00 call 11761c <__errno>
10e6fa: c7 00 16 00 00 00 movl $0x16,(%eax)
10e700: b8 ff ff ff ff mov $0xffffffff,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e705: c9 leave
10e706: c3 ret
0010e708 <sem_getvalue>:
int sem_getvalue(
sem_t *sem,
int *sval
)
{
10e708: 55 push %ebp
10e709: 89 e5 mov %esp,%ebp
10e70b: 83 ec 1c sub $0x1c,%esp
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
10e70e: 8d 45 f4 lea -0xc(%ebp),%eax
10e711: 50 push %eax
10e712: 8b 45 08 mov 0x8(%ebp),%eax
10e715: ff 30 pushl (%eax)
10e717: 68 e0 de 12 00 push $0x12dee0
10e71c: e8 03 21 00 00 call 110824 <_Objects_Get>
switch ( location ) {
10e721: 83 c4 10 add $0x10,%esp
10e724: 8b 55 f4 mov -0xc(%ebp),%edx
10e727: 85 d2 test %edx,%edx
10e729: 74 15 je 10e740 <sem_getvalue+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10e72b: e8 ec 8e 00 00 call 11761c <__errno>
10e730: c7 00 16 00 00 00 movl $0x16,(%eax)
10e736: b8 ff ff ff ff mov $0xffffffff,%eax
}
10e73b: c9 leave
10e73c: c3 ret
10e73d: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
10e740: 8b 50 64 mov 0x64(%eax),%edx
10e743: 8b 45 0c mov 0xc(%ebp),%eax
10e746: 89 10 mov %edx,(%eax)
_Thread_Enable_dispatch();
10e748: e8 df 2c 00 00 call 11142c <_Thread_Enable_dispatch>
return 0;
10e74d: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e74f: c9 leave
10e750: c3 ret
0010e79c <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
10e79c: 55 push %ebp
10e79d: 89 e5 mov %esp,%ebp
10e79f: 57 push %edi
10e7a0: 56 push %esi
10e7a1: 53 push %ebx
10e7a2: 83 ec 2c sub $0x2c,%esp
10e7a5: 8b 75 08 mov 0x8(%ebp),%esi
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10e7a8: a1 d0 db 12 00 mov 0x12dbd0,%eax
10e7ad: 40 inc %eax
10e7ae: a3 d0 db 12 00 mov %eax,0x12dbd0
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
10e7b3: 8b 7d 0c mov 0xc(%ebp),%edi
10e7b6: 81 e7 00 02 00 00 and $0x200,%edi
10e7bc: 0f 85 86 00 00 00 jne 10e848 <sem_open+0xac>
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
10e7c2: 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 );
10e7c9: 83 ec 08 sub $0x8,%esp
10e7cc: 8d 45 e4 lea -0x1c(%ebp),%eax
10e7cf: 50 push %eax
10e7d0: 56 push %esi
10e7d1: e8 5e 63 00 00 call 114b34 <_POSIX_Semaphore_Name_to_id>
10e7d6: 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 ) {
10e7d8: 83 c4 10 add $0x10,%esp
10e7db: 85 c0 test %eax,%eax
10e7dd: 74 25 je 10e804 <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) ) ) {
10e7df: 83 f8 02 cmp $0x2,%eax
10e7e2: 75 04 jne 10e7e8 <sem_open+0x4c> <== NEVER TAKEN
10e7e4: 85 ff test %edi,%edi
10e7e6: 75 6c jne 10e854 <sem_open+0xb8>
_Thread_Enable_dispatch();
10e7e8: e8 3f 2c 00 00 call 11142c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
10e7ed: e8 2a 8e 00 00 call 11761c <__errno>
10e7f2: 89 18 mov %ebx,(%eax)
10e7f4: b8 ff ff ff ff mov $0xffffffff,%eax
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
10e7f9: 8d 65 f4 lea -0xc(%ebp),%esp
10e7fc: 5b pop %ebx
10e7fd: 5e pop %esi
10e7fe: 5f pop %edi
10e7ff: c9 leave
10e800: c3 ret
10e801: 8d 76 00 lea 0x0(%esi),%esi
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
10e804: 8b 45 0c mov 0xc(%ebp),%eax
10e807: 25 00 0a 00 00 and $0xa00,%eax
10e80c: 3d 00 0a 00 00 cmp $0xa00,%eax
10e811: 74 65 je 10e878 <sem_open+0xdc>
10e813: 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 );
10e814: 8d 45 dc lea -0x24(%ebp),%eax
10e817: 50 push %eax
10e818: ff 75 e4 pushl -0x1c(%ebp)
10e81b: 68 e0 de 12 00 push $0x12dee0
10e820: e8 ff 1f 00 00 call 110824 <_Objects_Get>
10e825: 89 45 e0 mov %eax,-0x20(%ebp)
the_semaphore->open_count += 1;
10e828: ff 40 18 incl 0x18(%eax)
_Thread_Enable_dispatch();
10e82b: e8 fc 2b 00 00 call 11142c <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
10e830: e8 f7 2b 00 00 call 11142c <_Thread_Enable_dispatch>
goto return_id;
10e835: 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;
10e838: 8b 45 e0 mov -0x20(%ebp),%eax
10e83b: 83 c0 08 add $0x8,%eax
#endif
return id;
}
10e83e: 8d 65 f4 lea -0xc(%ebp),%esp
10e841: 5b pop %ebx
10e842: 5e pop %esi
10e843: 5f pop %edi
10e844: c9 leave
10e845: c3 ret
10e846: 66 90 xchg %ax,%ax
_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 );
10e848: 8b 45 14 mov 0x14(%ebp),%eax
10e84b: 89 45 d4 mov %eax,-0x2c(%ebp)
10e84e: e9 76 ff ff ff jmp 10e7c9 <sem_open+0x2d>
10e853: 90 nop
/*
* 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(
10e854: 8d 45 e0 lea -0x20(%ebp),%eax
10e857: 50 push %eax
10e858: ff 75 d4 pushl -0x2c(%ebp)
10e85b: 6a 00 push $0x0
10e85d: 56 push %esi
10e85e: e8 75 61 00 00 call 1149d8 <_POSIX_Semaphore_Create_support>
10e863: 89 c3 mov %eax,%ebx
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
10e865: e8 c2 2b 00 00 call 11142c <_Thread_Enable_dispatch>
if ( status == -1 )
10e86a: 83 c4 10 add $0x10,%esp
10e86d: 43 inc %ebx
10e86e: 75 c8 jne 10e838 <sem_open+0x9c>
return SEM_FAILED;
10e870: b8 ff ff ff ff mov $0xffffffff,%eax
10e875: eb c7 jmp 10e83e <sem_open+0xa2>
10e877: 90 nop
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
10e878: e8 af 2b 00 00 call 11142c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
10e87d: e8 9a 8d 00 00 call 11761c <__errno>
10e882: c7 00 11 00 00 00 movl $0x11,(%eax)
10e888: b8 ff ff ff ff mov $0xffffffff,%eax
10e88d: eb af jmp 10e83e <sem_open+0xa2>
0010e890 <sem_post>:
*/
int sem_post(
sem_t *sem
)
{
10e890: 55 push %ebp
10e891: 89 e5 mov %esp,%ebp
10e893: 83 ec 1c sub $0x1c,%esp
register POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
10e896: 8d 45 f4 lea -0xc(%ebp),%eax
10e899: 50 push %eax
10e89a: 8b 45 08 mov 0x8(%ebp),%eax
10e89d: ff 30 pushl (%eax)
10e89f: 68 e0 de 12 00 push $0x12dee0
10e8a4: e8 7b 1f 00 00 call 110824 <_Objects_Get>
switch ( location ) {
10e8a9: 83 c4 10 add $0x10,%esp
10e8ac: 8b 4d f4 mov -0xc(%ebp),%ecx
10e8af: 85 c9 test %ecx,%ecx
10e8b1: 74 15 je 10e8c8 <sem_post+0x38>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10e8b3: e8 64 8d 00 00 call 11761c <__errno>
10e8b8: c7 00 16 00 00 00 movl $0x16,(%eax)
10e8be: b8 ff ff ff ff mov $0xffffffff,%eax
}
10e8c3: c9 leave
10e8c4: c3 ret
10e8c5: 8d 76 00 lea 0x0(%esi),%esi
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_semaphore_Surrender(
10e8c8: 52 push %edx
10e8c9: 6a 00 push $0x0
10e8cb: ff 70 08 pushl 0x8(%eax)
10e8ce: 83 c0 1c add $0x1c,%eax
10e8d1: 50 push %eax
10e8d2: e8 61 15 00 00 call 10fe38 <_CORE_semaphore_Surrender>
NULL /* XXX need to define a routine to handle this case */
#else
NULL
#endif
);
_Thread_Enable_dispatch();
10e8d7: e8 50 2b 00 00 call 11142c <_Thread_Enable_dispatch>
return 0;
10e8dc: 83 c4 10 add $0x10,%esp
10e8df: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10e8e1: c9 leave
10e8e2: c3 ret
0010e8e4 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
10e8e4: 55 push %ebp
10e8e5: 89 e5 mov %esp,%ebp
10e8e7: 53 push %ebx
10e8e8: 83 ec 1c sub $0x1c,%esp
10e8eb: 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 );
10e8ee: 8d 45 f4 lea -0xc(%ebp),%eax
10e8f1: 50 push %eax
10e8f2: ff 75 0c pushl 0xc(%ebp)
10e8f5: e8 6e 55 00 00 call 113e68 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
10e8fa: 83 c4 10 add $0x10,%esp
10e8fd: 83 f8 03 cmp $0x3,%eax
10e900: 74 16 je 10e918 <sem_timedwait+0x34> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
10e902: 50 push %eax <== NOT EXECUTED
10e903: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED
10e906: 6a 00 push $0x0 <== NOT EXECUTED
10e908: 53 push %ebx <== NOT EXECUTED
10e909: e8 92 62 00 00 call 114ba0 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED
10e90e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
10e911: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10e914: c9 leave <== NOT EXECUTED
10e915: c3 ret <== NOT EXECUTED
10e916: 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 );
10e918: 52 push %edx
10e919: ff 75 f4 pushl -0xc(%ebp)
10e91c: 6a 01 push $0x1
10e91e: 53 push %ebx
10e91f: e8 7c 62 00 00 call 114ba0 <_POSIX_Semaphore_Wait_support>
10e924: 83 c4 10 add $0x10,%esp
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
10e927: 8b 5d fc mov -0x4(%ebp),%ebx
10e92a: c9 leave
10e92b: c3 ret
0010b33c <setitimer>:
int setitimer(
int which,
const struct itimerval *value,
struct itimerval *ovalue
)
{
10b33c: 55 push %ebp
10b33d: 89 e5 mov %esp,%ebp
10b33f: 83 ec 08 sub $0x8,%esp
if ( !value )
10b342: 8b 55 0c mov 0xc(%ebp),%edx
10b345: 85 d2 test %edx,%edx
10b347: 74 33 je 10b37c <setitimer+0x40>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
10b349: 8b 45 10 mov 0x10(%ebp),%eax
10b34c: 85 c0 test %eax,%eax
10b34e: 74 2c je 10b37c <setitimer+0x40>
rtems_set_errno_and_return_minus_one( EFAULT );
switch ( which ) {
10b350: 83 7d 08 02 cmpl $0x2,0x8(%ebp)
10b354: 76 12 jbe 10b368 <setitimer+0x2c>
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b356: e8 99 86 00 00 call 1139f4 <__errno>
10b35b: c7 00 16 00 00 00 movl $0x16,(%eax)
}
10b361: b8 ff ff ff ff mov $0xffffffff,%eax
10b366: c9 leave
10b367: c3 ret
switch ( which ) {
case ITIMER_REAL:
case ITIMER_VIRTUAL:
case ITIMER_PROF:
rtems_set_errno_and_return_minus_one( ENOSYS );
10b368: e8 87 86 00 00 call 1139f4 <__errno>
10b36d: c7 00 58 00 00 00 movl $0x58,(%eax)
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b373: b8 ff ff ff ff mov $0xffffffff,%eax
10b378: c9 leave
10b379: c3 ret
10b37a: 66 90 xchg %ax,%ax
{
if ( !value )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !ovalue )
rtems_set_errno_and_return_minus_one( EFAULT );
10b37c: e8 73 86 00 00 call 1139f4 <__errno>
10b381: c7 00 0e 00 00 00 movl $0xe,(%eax)
10b387: eb d8 jmp 10b361 <setitimer+0x25>
0010bd8c <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
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
10bd95: 8b 5d 08 mov 0x8(%ebp),%ebx
10bd98: 8b 45 0c mov 0xc(%ebp),%eax
10bd9b: 8b 55 10 mov 0x10(%ebp),%edx
ISR_Level level;
if ( oact )
10bd9e: 85 d2 test %edx,%edx
10bda0: 74 13 je 10bdb5 <sigaction+0x29>
*oact = _POSIX_signals_Vectors[ sig ];
10bda2: 8d 0c 5b lea (%ebx,%ebx,2),%ecx
10bda5: 8d 34 8d 60 a4 12 00 lea 0x12a460(,%ecx,4),%esi
10bdac: b9 03 00 00 00 mov $0x3,%ecx
10bdb1: 89 d7 mov %edx,%edi
10bdb3: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
if ( !sig )
10bdb5: 85 db test %ebx,%ebx
10bdb7: 74 77 je 10be30 <sigaction+0xa4>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10bdb9: 8d 53 ff lea -0x1(%ebx),%edx
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
10bdbc: 83 fa 1f cmp $0x1f,%edx
10bdbf: 77 6f ja 10be30 <sigaction+0xa4>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
10bdc1: 83 fb 09 cmp $0x9,%ebx
10bdc4: 74 6a je 10be30 <sigaction+0xa4>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
10bdc6: 85 c0 test %eax,%eax
10bdc8: 74 62 je 10be2c <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 );
10bdca: 9c pushf
10bdcb: fa cli
10bdcc: 8f 45 e4 popl -0x1c(%ebp)
if ( act->sa_handler == SIG_DFL ) {
10bdcf: 8b 50 08 mov 0x8(%eax),%edx
10bdd2: 85 d2 test %edx,%edx
10bdd4: 74 36 je 10be0c <sigaction+0x80>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
10bdd6: 83 ec 0c sub $0xc,%esp
10bdd9: 53 push %ebx
10bdda: 89 45 e0 mov %eax,-0x20(%ebp)
10bddd: e8 da 57 00 00 call 1115bc <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
10bde2: 8d 14 5b lea (%ebx,%ebx,2),%edx
10bde5: 8d 14 95 60 a4 12 00 lea 0x12a460(,%edx,4),%edx
10bdec: b9 03 00 00 00 mov $0x3,%ecx
10bdf1: 8b 45 e0 mov -0x20(%ebp),%eax
10bdf4: 89 d7 mov %edx,%edi
10bdf6: 89 c6 mov %eax,%esi
10bdf8: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10bdfa: 83 c4 10 add $0x10,%esp
}
_ISR_Enable( level );
10bdfd: ff 75 e4 pushl -0x1c(%ebp)
10be00: 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;
10be01: 31 c0 xor %eax,%eax
}
10be03: 8d 65 f4 lea -0xc(%ebp),%esp
10be06: 5b pop %ebx
10be07: 5e pop %esi
10be08: 5f pop %edi
10be09: c9 leave
10be0a: c3 ret
10be0b: 90 nop
* 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 ];
10be0c: 8d 34 5b lea (%ebx,%ebx,2),%esi
10be0f: c1 e6 02 shl $0x2,%esi
10be12: 8d 86 60 a4 12 00 lea 0x12a460(%esi),%eax
10be18: 81 c6 e0 38 12 00 add $0x1238e0,%esi
10be1e: b9 03 00 00 00 mov $0x3,%ecx
10be23: 89 c7 mov %eax,%edi
10be25: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
10be27: eb d4 jmp 10bdfd <sigaction+0x71>
10be29: 8d 76 00 lea 0x0(%esi),%esi
* 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;
10be2c: 31 c0 xor %eax,%eax
10be2e: eb d3 jmp 10be03 <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 );
10be30: e8 ab 84 00 00 call 1142e0 <__errno>
10be35: c7 00 16 00 00 00 movl $0x16,(%eax)
10be3b: b8 ff ff ff ff mov $0xffffffff,%eax
10be40: eb c1 jmp 10be03 <sigaction+0x77>
0010c164 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
10c164: 55 push %ebp
10c165: 89 e5 mov %esp,%ebp
10c167: 57 push %edi
10c168: 56 push %esi
10c169: 53 push %ebx
10c16a: 83 ec 2c sub $0x2c,%esp
10c16d: 8b 5d 08 mov 0x8(%ebp),%ebx
10c170: 8b 7d 0c mov 0xc(%ebp),%edi
10c173: 8b 75 10 mov 0x10(%ebp),%esi
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
10c176: 85 db test %ebx,%ebx
10c178: 0f 84 9e 01 00 00 je 10c31c <sigtimedwait+0x1b8>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
10c17e: 85 f6 test %esi,%esi
10c180: 0f 84 3e 01 00 00 je 10c2c4 <sigtimedwait+0x160>
if ( !_Timespec_Is_valid( timeout ) )
10c186: 83 ec 0c sub $0xc,%esp
10c189: 56 push %esi
10c18a: e8 55 36 00 00 call 10f7e4 <_Timespec_Is_valid>
10c18f: 83 c4 10 add $0x10,%esp
10c192: 84 c0 test %al,%al
10c194: 0f 84 82 01 00 00 je 10c31c <sigtimedwait+0x1b8>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
10c19a: 83 ec 0c sub $0xc,%esp
10c19d: 56 push %esi
10c19e: e8 a9 36 00 00 call 10f84c <_Timespec_To_ticks>
if ( !interval )
10c1a3: 83 c4 10 add $0x10,%esp
10c1a6: 85 c0 test %eax,%eax
10c1a8: 0f 84 6e 01 00 00 je 10c31c <sigtimedwait+0x1b8> <== NEVER TAKEN
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c1ae: 85 ff test %edi,%edi
10c1b0: 0f 84 18 01 00 00 je 10c2ce <sigtimedwait+0x16a> <== NEVER TAKEN
the_thread = _Thread_Executing;
10c1b6: 8b 0d 98 9b 12 00 mov 0x129b98,%ecx
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
10c1bc: 8b 91 ec 00 00 00 mov 0xec(%ecx),%edx
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
10c1c2: 9c pushf
10c1c3: fa cli
10c1c4: 8f 45 d0 popl -0x30(%ebp)
if ( *set & api->signals_pending ) {
10c1c7: 8b 33 mov (%ebx),%esi
10c1c9: 89 75 d4 mov %esi,-0x2c(%ebp)
10c1cc: 8b b2 d4 00 00 00 mov 0xd4(%edx),%esi
10c1d2: 85 75 d4 test %esi,-0x2c(%ebp)
10c1d5: 0f 85 fd 00 00 00 jne 10c2d8 <sigtimedwait+0x174>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
10c1db: 8b 35 08 9e 12 00 mov 0x129e08,%esi
10c1e1: 85 75 d4 test %esi,-0x2c(%ebp)
10c1e4: 0f 85 96 00 00 00 jne 10c280 <sigtimedwait+0x11c>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
10c1ea: c7 07 ff ff ff ff movl $0xffffffff,(%edi)
10c1f0: 8b 35 f0 95 12 00 mov 0x1295f0,%esi
10c1f6: 46 inc %esi
10c1f7: 89 35 f0 95 12 00 mov %esi,0x1295f0
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
10c1fd: c7 41 44 a0 9d 12 00 movl $0x129da0,0x44(%ecx)
the_thread->Wait.return_code = EINTR;
10c204: c7 41 34 04 00 00 00 movl $0x4,0x34(%ecx)
the_thread->Wait.option = *set;
10c20b: 8b 33 mov (%ebx),%esi
10c20d: 89 71 30 mov %esi,0x30(%ecx)
the_thread->Wait.return_argument = the_info;
10c210: 89 79 28 mov %edi,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;
10c213: c7 05 d0 9d 12 00 01 movl $0x1,0x129dd0
10c21a: 00 00 00
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
10c21d: ff 75 d0 pushl -0x30(%ebp)
10c220: 9d popf
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
10c221: 51 push %ecx
10c222: 68 24 f5 10 00 push $0x10f524
10c227: 50 push %eax
10c228: 68 a0 9d 12 00 push $0x129da0
10c22d: 89 55 cc mov %edx,-0x34(%ebp)
10c230: e8 c3 2f 00 00 call 10f1f8 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
10c235: e8 16 2b 00 00 call 10ed50 <_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 );
10c23a: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c241: 6a 00 push $0x0
10c243: 57 push %edi
10c244: ff 37 pushl (%edi)
10c246: 8b 55 cc mov -0x34(%ebp),%edx
10c249: 52 push %edx
10c24a: e8 59 5a 00 00 call 111ca8 <_POSIX_signals_Clear_signals>
/* Set errno only if return code is not EINTR or
* if EINTR was caused by a signal being caught, which
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
10c24f: 83 c4 20 add $0x20,%esp
10c252: a1 98 9b 12 00 mov 0x129b98,%eax
10c257: 83 78 34 04 cmpl $0x4,0x34(%eax)
10c25b: 0f 85 d3 00 00 00 jne 10c334 <sigtimedwait+0x1d0>
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
10c261: 8b 37 mov (%edi),%esi
10c263: 8d 4e ff lea -0x1(%esi),%ecx
10c266: b8 01 00 00 00 mov $0x1,%eax
10c26b: d3 e0 shl %cl,%eax
10c26d: 85 03 test %eax,(%ebx)
10c26f: 0f 84 bf 00 00 00 je 10c334 <sigtimedwait+0x1d0>
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
10c275: 89 f0 mov %esi,%eax
10c277: 8d 65 f4 lea -0xc(%ebp),%esp
10c27a: 5b pop %ebx
10c27b: 5e pop %esi
10c27c: 5f pop %edi
10c27d: c9 leave
10c27e: c3 ret
10c27f: 90 nop
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
10c280: 83 ec 0c sub $0xc,%esp
10c283: 56 push %esi
10c284: 89 55 cc mov %edx,-0x34(%ebp)
10c287: e8 94 fe ff ff call 10c120 <_POSIX_signals_Get_lowest>
10c28c: 89 c6 mov %eax,%esi
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
10c28e: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c295: 6a 01 push $0x1
10c297: 57 push %edi
10c298: 50 push %eax
10c299: 8b 55 cc mov -0x34(%ebp),%edx
10c29c: 52 push %edx
10c29d: e8 06 5a 00 00 call 111ca8 <_POSIX_signals_Clear_signals>
_ISR_Enable( level );
10c2a2: ff 75 d0 pushl -0x30(%ebp)
10c2a5: 9d popf
the_info->si_signo = signo;
10c2a6: 89 37 mov %esi,(%edi)
the_info->si_code = SI_USER;
10c2a8: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi)
the_info->si_value.sival_int = 0;
10c2af: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
return signo;
10c2b6: 83 c4 20 add $0x20,%esp
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
10c2b9: 89 f0 mov %esi,%eax
10c2bb: 8d 65 f4 lea -0xc(%ebp),%esp
10c2be: 5b pop %ebx
10c2bf: 5e pop %esi
10c2c0: 5f pop %edi
10c2c1: c9 leave
10c2c2: c3 ret
10c2c3: 90 nop
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
10c2c4: 31 c0 xor %eax,%eax
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
10c2c6: 85 ff test %edi,%edi
10c2c8: 0f 85 e8 fe ff ff jne 10c1b6 <sigtimedwait+0x52>
10c2ce: 8d 7d dc lea -0x24(%ebp),%edi
10c2d1: e9 e0 fe ff ff jmp 10c1b6 <sigtimedwait+0x52>
10c2d6: 66 90 xchg %ax,%ax
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
10c2d8: 83 ec 0c sub $0xc,%esp
10c2db: 56 push %esi
10c2dc: 89 55 cc mov %edx,-0x34(%ebp)
10c2df: e8 3c fe ff ff call 10c120 <_POSIX_signals_Get_lowest>
10c2e4: 89 07 mov %eax,(%edi)
_POSIX_signals_Clear_signals(
10c2e6: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10c2ed: 6a 00 push $0x0
10c2ef: 57 push %edi
10c2f0: 50 push %eax
10c2f1: 8b 55 cc mov -0x34(%ebp),%edx
10c2f4: 52 push %edx
10c2f5: e8 ae 59 00 00 call 111ca8 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
10c2fa: ff 75 d0 pushl -0x30(%ebp)
10c2fd: 9d popf
the_info->si_code = SI_USER;
10c2fe: c7 47 04 01 00 00 00 movl $0x1,0x4(%edi)
the_info->si_value.sival_int = 0;
10c305: c7 47 08 00 00 00 00 movl $0x0,0x8(%edi)
return the_info->si_signo;
10c30c: 8b 37 mov (%edi),%esi
10c30e: 83 c4 20 add $0x20,%esp
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
10c311: 89 f0 mov %esi,%eax
10c313: 8d 65 f4 lea -0xc(%ebp),%esp
10c316: 5b pop %ebx
10c317: 5e pop %esi
10c318: 5f pop %edi
10c319: c9 leave
10c31a: c3 ret
10c31b: 90 nop
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
10c31c: e8 03 86 00 00 call 114924 <__errno>
10c321: c7 00 16 00 00 00 movl $0x16,(%eax)
10c327: be ff ff ff ff mov $0xffffffff,%esi
10c32c: e9 44 ff ff ff jmp 10c275 <sigtimedwait+0x111>
10c331: 8d 76 00 lea 0x0(%esi),%esi
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
errno = _Thread_Executing->Wait.return_code;
10c334: e8 eb 85 00 00 call 114924 <__errno>
10c339: 8b 15 98 9b 12 00 mov 0x129b98,%edx
10c33f: 8b 52 34 mov 0x34(%edx),%edx
10c342: 89 10 mov %edx,(%eax)
return -1;
10c344: be ff ff ff ff mov $0xffffffff,%esi
10c349: e9 27 ff ff ff jmp 10c275 <sigtimedwait+0x111>
0010dfec <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
10dfec: 55 push %ebp
10dfed: 89 e5 mov %esp,%ebp
10dfef: 53 push %ebx
10dff0: 83 ec 08 sub $0x8,%esp
10dff3: 8b 5d 0c mov 0xc(%ebp),%ebx
int status;
status = sigtimedwait( set, NULL, NULL );
10dff6: 6a 00 push $0x0
10dff8: 6a 00 push $0x0
10dffa: ff 75 08 pushl 0x8(%ebp)
10dffd: e8 e6 fd ff ff call 10dde8 <sigtimedwait>
if ( status != -1 ) {
10e002: 83 c4 10 add $0x10,%esp
10e005: 83 f8 ff cmp $0xffffffff,%eax
10e008: 74 0e je 10e018 <sigwait+0x2c>
if ( sig )
10e00a: 85 db test %ebx,%ebx
10e00c: 74 16 je 10e024 <sigwait+0x38> <== NEVER TAKEN
*sig = status;
10e00e: 89 03 mov %eax,(%ebx)
return 0;
10e010: 31 c0 xor %eax,%eax
}
return errno;
}
10e012: 8b 5d fc mov -0x4(%ebp),%ebx
10e015: c9 leave
10e016: c3 ret
10e017: 90 nop
if ( sig )
*sig = status;
return 0;
}
return errno;
10e018: e8 d7 80 00 00 call 1160f4 <__errno>
10e01d: 8b 00 mov (%eax),%eax
}
10e01f: 8b 5d fc mov -0x4(%ebp),%ebx
10e022: c9 leave
10e023: c3 ret
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
10e024: 31 c0 xor %eax,%eax
}
return errno;
}
10e026: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED
10e029: c9 leave <== NOT EXECUTED
10e02a: c3 ret <== NOT EXECUTED
0010a100 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
10a100: 55 push %ebp
10a101: 89 e5 mov %esp,%ebp
10a103: 56 push %esi
10a104: 53 push %ebx
10a105: 89 d3 mov %edx,%ebx
10a107: 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)) {
10a109: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx)
10a110: 75 12 jne 10a124 <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);
10a112: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED
10a115: 89 da mov %ebx,%edx <== NOT EXECUTED
}
return i;
}
10a117: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED
10a11a: 5b pop %ebx <== NOT EXECUTED
10a11b: 5e pop %esi <== NOT EXECUTED
10a11c: 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);
10a11d: e9 92 fe ff ff jmp 109fb4 <iproc> <== NOT EXECUTED
10a122: 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);
10a124: 52 push %edx
10a125: 6a 00 push $0x0
10a127: 6a 00 push $0x0
10a129: ff 73 18 pushl 0x18(%ebx)
10a12c: e8 c7 15 00 00 call 10b6f8 <rtems_semaphore_obtain>
i = iproc (c, tty);
10a131: 89 f2 mov %esi,%edx
10a133: 0f b6 c2 movzbl %dl,%eax
10a136: 89 da mov %ebx,%edx
10a138: e8 77 fe ff ff call 109fb4 <iproc>
10a13d: 89 c6 mov %eax,%esi
rtems_semaphore_release (tty->osem);
10a13f: 58 pop %eax
10a140: ff 73 18 pushl 0x18(%ebx)
10a143: e8 ac 16 00 00 call 10b7f4 <rtems_semaphore_release>
10a148: 83 c4 10 add $0x10,%esp
}
else {
i = iproc (c, tty);
}
return i;
}
10a14b: 89 f0 mov %esi,%eax
10a14d: 8d 65 f8 lea -0x8(%ebp),%esp
10a150: 5b pop %ebx
10a151: 5e pop %esi
10a152: c9 leave
10a153: c3 ret
00108f14 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
108f14: 55 push %ebp
108f15: 89 e5 mov %esp,%ebp
108f17: 57 push %edi
108f18: 56 push %esi
108f19: 53 push %ebx
108f1a: 83 ec 3c sub $0x3c,%esp
108f1d: 8b 55 08 mov 0x8(%ebp),%edx
108f20: 8b 75 0c mov 0xc(%ebp),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
108f23: 85 f6 test %esi,%esi
108f25: 74 65 je 108f8c <stat+0x78>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
108f27: b9 ff ff ff ff mov $0xffffffff,%ecx
108f2c: 89 d7 mov %edx,%edi
108f2e: 31 c0 xor %eax,%eax
108f30: f2 ae repnz scas %es:(%edi),%al
108f32: f7 d1 not %ecx
108f34: 49 dec %ecx
108f35: 83 ec 0c sub $0xc,%esp
108f38: 6a 01 push $0x1
108f3a: 8d 5d d4 lea -0x2c(%ebp),%ebx
108f3d: 53 push %ebx
108f3e: 6a 00 push $0x0
108f40: 51 push %ecx
108f41: 52 push %edx
108f42: e8 1d f1 ff ff call 108064 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
108f47: 83 c4 20 add $0x20,%esp
108f4a: 85 c0 test %eax,%eax
108f4c: 74 0e je 108f5c <stat+0x48>
return -1;
108f4e: b8 ff ff ff ff mov $0xffffffff,%eax
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
108f53: 8d 65 f4 lea -0xc(%ebp),%esp
108f56: 5b pop %ebx
108f57: 5e pop %esi
108f58: 5f pop %edi
108f59: c9 leave
108f5a: c3 ret
108f5b: 90 nop
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
108f5c: b9 48 00 00 00 mov $0x48,%ecx
108f61: 89 f7 mov %esi,%edi
108f63: f3 aa rep stos %al,%es:(%edi)
status = (*loc.handlers->fstat_h)( &loc, buf );
108f65: 83 ec 08 sub $0x8,%esp
108f68: 56 push %esi
108f69: 53 push %ebx
108f6a: 8b 45 dc mov -0x24(%ebp),%eax
108f6d: ff 50 18 call *0x18(%eax)
rtems_filesystem_freenode( &loc );
108f70: 89 1c 24 mov %ebx,(%esp)
108f73: 89 45 c4 mov %eax,-0x3c(%ebp)
108f76: e8 c1 f1 ff ff call 10813c <rtems_filesystem_freenode>
return status;
108f7b: 83 c4 10 add $0x10,%esp
108f7e: 8b 45 c4 mov -0x3c(%ebp),%eax
}
108f81: 8d 65 f4 lea -0xc(%ebp),%esp
108f84: 5b pop %ebx
108f85: 5e pop %esi
108f86: 5f pop %edi
108f87: c9 leave
108f88: c3 ret
108f89: 8d 76 00 lea 0x0(%esi),%esi
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
108f8c: e8 77 87 00 00 call 111708 <__errno>
108f91: c7 00 0e 00 00 00 movl $0xe,(%eax)
108f97: b8 ff ff ff ff mov $0xffffffff,%eax
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
108f9c: 8d 65 f4 lea -0xc(%ebp),%esp
108f9f: 5b pop %ebx
108fa0: 5e pop %esi
108fa1: 5f pop %edi
108fa2: c9 leave
108fa3: c3 ret
0010b384 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
10b384: 55 push %ebp
10b385: 89 e5 mov %esp,%ebp
10b387: 57 push %edi
10b388: 56 push %esi
10b389: 53 push %ebx
10b38a: 83 ec 48 sub $0x48,%esp
10b38d: 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 ) )
10b390: 31 f6 xor %esi,%esi
10b392: b9 ff ff ff ff mov $0xffffffff,%ecx
10b397: 89 d7 mov %edx,%edi
10b399: 89 f0 mov %esi,%eax
10b39b: f2 ae repnz scas %es:(%edi),%al
10b39d: f7 d1 not %ecx
10b39f: 49 dec %ecx
10b3a0: 6a 01 push $0x1
10b3a2: 8d 5d d4 lea -0x2c(%ebp),%ebx
10b3a5: 53 push %ebx
10b3a6: 6a 00 push $0x0
10b3a8: 51 push %ecx
10b3a9: 52 push %edx
10b3aa: e8 85 eb ff ff call 109f34 <rtems_filesystem_evaluate_path>
10b3af: 83 c4 20 add $0x20,%esp
10b3b2: 85 c0 test %eax,%eax
10b3b4: 74 0e je 10b3c4 <statvfs+0x40> <== ALWAYS TAKEN
return -1;
10b3b6: 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;
}
10b3bb: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10b3be: 5b pop %ebx <== NOT EXECUTED
10b3bf: 5e pop %esi <== NOT EXECUTED
10b3c0: 5f pop %edi <== NOT EXECUTED
10b3c1: c9 leave <== NOT EXECUTED
10b3c2: c3 ret <== NOT EXECUTED
10b3c3: 90 nop <== NOT EXECUTED
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
10b3c4: 8b 55 e4 mov -0x1c(%ebp),%edx
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
10b3c7: b9 38 00 00 00 mov $0x38,%ecx
10b3cc: 8b 7d 0c mov 0xc(%ebp),%edi
10b3cf: 89 f0 mov %esi,%eax
10b3d1: f3 aa rep stos %al,%es:(%edi)
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
10b3d3: 83 ec 08 sub $0x8,%esp
10b3d6: 8b 42 28 mov 0x28(%edx),%eax
10b3d9: 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;
10b3dc: 83 c2 1c add $0x1c,%edx
memset (sb, 0, sizeof (struct statvfs));
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
10b3df: 52 push %edx
10b3e0: ff 50 44 call *0x44(%eax)
rtems_filesystem_freenode( &loc );
10b3e3: 89 1c 24 mov %ebx,(%esp)
10b3e6: 89 45 c4 mov %eax,-0x3c(%ebp)
10b3e9: e8 1e ec ff ff call 10a00c <rtems_filesystem_freenode>
return result;
10b3ee: 83 c4 10 add $0x10,%esp
10b3f1: 8b 45 c4 mov -0x3c(%ebp),%eax
}
10b3f4: 8d 65 f4 lea -0xc(%ebp),%esp
10b3f7: 5b pop %ebx
10b3f8: 5e pop %esi
10b3f9: 5f pop %edi
10b3fa: c9 leave
10b3fb: c3 ret
0010ad3c <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
10ad3c: 55 push %ebp
10ad3d: 89 e5 mov %esp,%ebp
10ad3f: 56 push %esi
10ad40: 53 push %ebx
10ad41: 83 ec 34 sub $0x34,%esp
10ad44: 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 );
10ad47: 8d 5d dc lea -0x24(%ebp),%ebx
10ad4a: 53 push %ebx
10ad4b: 8d 45 f4 lea -0xc(%ebp),%eax
10ad4e: 50 push %eax
10ad4f: 56 push %esi
10ad50: e8 0f ff ff ff call 10ac64 <rtems_filesystem_get_start_loc>
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
10ad55: 83 c4 0c add $0xc,%esp
10ad58: 8d 45 f0 lea -0x10(%ebp),%eax
10ad5b: 50 push %eax
10ad5c: 53 push %ebx
10ad5d: 03 75 f4 add -0xc(%ebp),%esi
10ad60: 56 push %esi
10ad61: 8b 45 e8 mov -0x18(%ebp),%eax
10ad64: ff 50 04 call *0x4(%eax)
if ( result != 0 )
10ad67: 83 c4 10 add $0x10,%esp
10ad6a: 85 c0 test %eax,%eax
10ad6c: 74 0e je 10ad7c <symlink+0x40>
return -1;
10ad6e: b8 ff ff ff ff mov $0xffffffff,%eax
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );
return result;
}
10ad73: 8d 65 f8 lea -0x8(%ebp),%esp
10ad76: 5b pop %ebx
10ad77: 5e pop %esi
10ad78: c9 leave
10ad79: c3 ret
10ad7a: 66 90 xchg %ax,%ax
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
10ad7c: 50 push %eax
10ad7d: ff 75 f0 pushl -0x10(%ebp)
10ad80: ff 75 08 pushl 0x8(%ebp)
10ad83: 53 push %ebx
10ad84: 8b 45 e8 mov -0x18(%ebp),%eax
10ad87: ff 50 38 call *0x38(%eax)
rtems_filesystem_freenode( &loc );
10ad8a: 89 1c 24 mov %ebx,(%esp)
10ad8d: 89 45 d4 mov %eax,-0x2c(%ebp)
10ad90: e8 47 ec ff ff call 1099dc <rtems_filesystem_freenode>
return result;
10ad95: 83 c4 10 add $0x10,%esp
10ad98: 8b 45 d4 mov -0x2c(%ebp),%eax
}
10ad9b: 8d 65 f8 lea -0x8(%ebp),%esp
10ad9e: 5b pop %ebx
10ad9f: 5e pop %esi
10ada0: c9 leave
10ada1: c3 ret
0010a210 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
10a210: 55 push %ebp
10a211: 89 e5 mov %esp,%ebp
10a213: 53 push %ebx
10a214: 83 ec 04 sub $0x4,%esp
10a217: 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;
10a21a: 8b 90 e4 00 00 00 mov 0xe4(%eax),%edx
if ( this_reent ) {
10a220: 85 d2 test %edx,%edx
10a222: 74 33 je 10a257 <sync_per_thread+0x47> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
10a224: 8b 0d 38 a0 12 00 mov 0x12a038,%ecx
10a22a: 8b 99 e4 00 00 00 mov 0xe4(%ecx),%ebx
_Thread_Executing->libc_reent = this_reent;
10a230: 89 91 e4 00 00 00 mov %edx,0xe4(%ecx)
_fwalk (t->libc_reent, sync_wrapper);
10a236: 83 ec 08 sub $0x8,%esp
10a239: 68 5c a2 10 00 push $0x10a25c
10a23e: ff b0 e4 00 00 00 pushl 0xe4(%eax)
10a244: e8 23 b1 00 00 call 11536c <_fwalk>
_Thread_Executing->libc_reent = current_reent;
10a249: a1 38 a0 12 00 mov 0x12a038,%eax
10a24e: 89 98 e4 00 00 00 mov %ebx,0xe4(%eax)
10a254: 83 c4 10 add $0x10,%esp
}
}
10a257: 8b 5d fc mov -0x4(%ebp),%ebx
10a25a: c9 leave
10a25b: c3 ret
0010a8bc <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
10a8bc: 55 push %ebp
10a8bd: 89 e5 mov %esp,%ebp
10a8bf: 56 push %esi
10a8c0: 53 push %ebx
10a8c1: 8b 5d 08 mov 0x8(%ebp),%ebx
10a8c4: 8b 45 0c mov 0xc(%ebp),%eax
10a8c7: 8b 75 10 mov 0x10(%ebp),%esi
switch (opt) {
10a8ca: 85 c0 test %eax,%eax
10a8cc: 74 2c je 10a8fa <tcsetattr+0x3e>
10a8ce: 48 dec %eax
10a8cf: 74 17 je 10a8e8 <tcsetattr+0x2c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
10a8d1: e8 86 a5 00 00 call 114e5c <__errno>
10a8d6: c7 00 86 00 00 00 movl $0x86,(%eax)
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
10a8dc: b8 ff ff ff ff mov $0xffffffff,%eax
10a8e1: 8d 65 f8 lea -0x8(%ebp),%esp
10a8e4: 5b pop %ebx
10a8e5: 5e pop %esi
10a8e6: c9 leave
10a8e7: c3 ret
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
10a8e8: 50 push %eax
10a8e9: 6a 00 push $0x0
10a8eb: 6a 03 push $0x3
10a8ed: 53 push %ebx
10a8ee: e8 21 72 00 00 call 111b14 <ioctl>
10a8f3: 83 c4 10 add $0x10,%esp
10a8f6: 85 c0 test %eax,%eax
10a8f8: 78 e2 js 10a8dc <tcsetattr+0x20> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
10a8fa: 89 75 10 mov %esi,0x10(%ebp)
10a8fd: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp)
10a904: 89 5d 08 mov %ebx,0x8(%ebp)
}
}
10a907: 8d 65 f8 lea -0x8(%ebp),%esp
10a90a: 5b pop %ebx
10a90b: 5e pop %esi
10a90c: c9 leave
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
10a90d: e9 02 72 00 00 jmp 111b14 <ioctl>
0010b548 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
10b548: 55 push %ebp
10b549: 89 e5 mov %esp,%ebp
10b54b: 56 push %esi
10b54c: 53 push %ebx
10b54d: 8b 5d 0c mov 0xc(%ebp),%ebx
10b550: 8b 75 10 mov 0x10(%ebp),%esi
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
10b553: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
10b557: 0f 85 db 00 00 00 jne 10b638 <timer_create+0xf0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
10b55d: 85 f6 test %esi,%esi
10b55f: 0f 84 d3 00 00 00 je 10b638 <timer_create+0xf0>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
10b565: 85 db test %ebx,%ebx
10b567: 74 21 je 10b58a <timer_create+0x42>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
10b569: 8b 03 mov (%ebx),%eax
10b56b: 48 dec %eax
10b56c: 83 f8 01 cmp $0x1,%eax
10b56f: 0f 87 c3 00 00 00 ja 10b638 <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 )
10b575: 8b 43 04 mov 0x4(%ebx),%eax
10b578: 85 c0 test %eax,%eax
10b57a: 0f 84 b8 00 00 00 je 10b638 <timer_create+0xf0> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
10b580: 48 dec %eax
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
10b581: 83 f8 1f cmp $0x1f,%eax
10b584: 0f 87 ae 00 00 00 ja 10b638 <timer_create+0xf0> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
10b58a: a1 90 a1 12 00 mov 0x12a190,%eax
10b58f: 40 inc %eax
10b590: a3 90 a1 12 00 mov %eax,0x12a190
* 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 );
10b595: 83 ec 0c sub $0xc,%esp
10b598: 68 e0 a4 12 00 push $0x12a4e0
10b59d: e8 9a 1e 00 00 call 10d43c <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
10b5a2: 83 c4 10 add $0x10,%esp
10b5a5: 85 c0 test %eax,%eax
10b5a7: 0f 84 a2 00 00 00 je 10b64f <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;
10b5ad: c6 40 3c 02 movb $0x2,0x3c(%eax)
ptimer->thread_id = _Thread_Executing->Object.id;
10b5b1: 8b 15 38 a7 12 00 mov 0x12a738,%edx
10b5b7: 8b 52 08 mov 0x8(%edx),%edx
10b5ba: 89 50 38 mov %edx,0x38(%eax)
if ( evp != NULL ) {
10b5bd: 85 db test %ebx,%ebx
10b5bf: 74 11 je 10b5d2 <timer_create+0x8a>
ptimer->inf.sigev_notify = evp->sigev_notify;
10b5c1: 8b 13 mov (%ebx),%edx
10b5c3: 89 50 40 mov %edx,0x40(%eax)
ptimer->inf.sigev_signo = evp->sigev_signo;
10b5c6: 8b 53 04 mov 0x4(%ebx),%edx
10b5c9: 89 50 44 mov %edx,0x44(%eax)
ptimer->inf.sigev_value = evp->sigev_value;
10b5cc: 8b 53 08 mov 0x8(%ebx),%edx
10b5cf: 89 50 48 mov %edx,0x48(%eax)
}
ptimer->overrun = 0;
10b5d2: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
ptimer->timer_data.it_value.tv_sec = 0;
10b5d9: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax)
ptimer->timer_data.it_value.tv_nsec = 0;
10b5e0: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax)
ptimer->timer_data.it_interval.tv_sec = 0;
10b5e7: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax)
ptimer->timer_data.it_interval.tv_nsec = 0;
10b5ee: 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;
10b5f5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax)
the_watchdog->routine = routine;
10b5fc: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax)
the_watchdog->id = id;
10b603: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax)
the_watchdog->user_data = user_data;
10b60a: 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 ),
10b611: 8b 50 08 mov 0x8(%eax),%edx
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
10b614: 0f b7 da movzwl %dx,%ebx
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
10b617: 8b 0d fc a4 12 00 mov 0x12a4fc,%ecx
10b61d: 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;
10b620: 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;
10b627: 89 16 mov %edx,(%esi)
_Thread_Enable_dispatch();
10b629: e8 4a 2e 00 00 call 10e478 <_Thread_Enable_dispatch>
return 0;
10b62e: 31 c0 xor %eax,%eax
}
10b630: 8d 65 f8 lea -0x8(%ebp),%esp
10b633: 5b pop %ebx
10b634: 5e pop %esi
10b635: c9 leave
10b636: c3 ret
10b637: 90 nop
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 );
10b638: e8 57 8a 00 00 call 114094 <__errno>
10b63d: c7 00 16 00 00 00 movl $0x16,(%eax)
10b643: 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;
}
10b648: 8d 65 f8 lea -0x8(%ebp),%esp
10b64b: 5b pop %ebx
10b64c: 5e pop %esi
10b64d: c9 leave
10b64e: c3 ret
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
10b64f: e8 24 2e 00 00 call 10e478 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
10b654: e8 3b 8a 00 00 call 114094 <__errno>
10b659: c7 00 0b 00 00 00 movl $0xb,(%eax)
10b65f: b8 ff ff ff ff mov $0xffffffff,%eax
10b664: eb ca jmp 10b630 <timer_create+0xe8>
0010ba8c <timer_delete>:
int timer_delete(
timer_t timerid
)
{
10ba8c: 55 push %ebp
10ba8d: 89 e5 mov %esp,%ebp
10ba8f: 53 push %ebx
10ba90: 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 );
10ba93: 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 );
10ba96: 50 push %eax
10ba97: ff 75 08 pushl 0x8(%ebp)
10ba9a: 68 a0 a3 12 00 push $0x12a3a0
10ba9f: e8 9c 21 00 00 call 10dc40 <_Objects_Get>
10baa4: 89 c3 mov %eax,%ebx
switch ( location ) {
10baa6: 83 c4 10 add $0x10,%esp
10baa9: 8b 4d f4 mov -0xc(%ebp),%ecx
10baac: 85 c9 test %ecx,%ecx
10baae: 74 18 je 10bac8 <timer_delete+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10bab0: e8 df 8c 00 00 call 114794 <__errno>
10bab5: c7 00 16 00 00 00 movl $0x16,(%eax)
10babb: b8 ff ff ff ff mov $0xffffffff,%eax
}
10bac0: 8b 5d fc mov -0x4(%ebp),%ebx
10bac3: c9 leave
10bac4: c3 ret
10bac5: 8d 76 00 lea 0x0(%esi),%esi
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Timer_Information, &ptimer->Object );
10bac8: 83 ec 08 sub $0x8,%esp
10bacb: 50 push %eax
10bacc: 68 a0 a3 12 00 push $0x12a3a0
10bad1: e8 32 1d 00 00 call 10d808 <_Objects_Close>
ptimer->state = POSIX_TIMER_STATE_FREE;
10bad6: c6 43 3c 01 movb $0x1,0x3c(%ebx)
(void) _Watchdog_Remove( &ptimer->Timer );
10bada: 8d 43 10 lea 0x10(%ebx),%eax
10badd: 89 04 24 mov %eax,(%esp)
10bae0: e8 7f 3c 00 00 call 10f764 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free (
POSIX_Timer_Control *the_timer
)
{
_Objects_Free( &_POSIX_Timer_Information, &the_timer->Object );
10bae5: 58 pop %eax
10bae6: 5a pop %edx
10bae7: 53 push %ebx
10bae8: 68 a0 a3 12 00 push $0x12a3a0
10baed: e8 0e 20 00 00 call 10db00 <_Objects_Free>
_POSIX_Timer_Free( ptimer );
_Thread_Enable_dispatch();
10baf2: e8 d1 2c 00 00 call 10e7c8 <_Thread_Enable_dispatch>
return 0;
10baf7: 83 c4 10 add $0x10,%esp
10bafa: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10bafc: 8b 5d fc mov -0x4(%ebp),%ebx
10baff: c9 leave
10bb00: c3 ret
0010c948 <timer_getoverrun>:
* its execution, _POSIX_Timer_TSR will have to set this counter to 0.
*/
int timer_getoverrun(
timer_t timerid
)
{
10c948: 55 push %ebp
10c949: 89 e5 mov %esp,%ebp
10c94b: 53 push %ebx
10c94c: 83 ec 18 sub $0x18,%esp
int overrun;
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
10c94f: 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 );
10c952: 50 push %eax
10c953: ff 75 08 pushl 0x8(%ebp)
10c956: 68 80 ba 12 00 push $0x12ba80
10c95b: e8 24 21 00 00 call 10ea84 <_Objects_Get>
switch ( location ) {
10c960: 83 c4 10 add $0x10,%esp
10c963: 8b 55 f4 mov -0xc(%ebp),%edx
10c966: 85 d2 test %edx,%edx
10c968: 74 1a je 10c984 <timer_getoverrun+0x3c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10c96a: e8 a5 88 00 00 call 115214 <__errno>
10c96f: c7 00 16 00 00 00 movl $0x16,(%eax)
10c975: bb ff ff ff ff mov $0xffffffff,%ebx
}
10c97a: 89 d8 mov %ebx,%eax
10c97c: 8b 5d fc mov -0x4(%ebp),%ebx
10c97f: c9 leave
10c980: c3 ret
10c981: 8d 76 00 lea 0x0(%esi),%esi
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
overrun = ptimer->overrun;
10c984: 8b 58 68 mov 0x68(%eax),%ebx
ptimer->overrun = 0;
10c987: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax)
_Thread_Enable_dispatch();
10c98e: e8 79 2c 00 00 call 10f60c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10c993: 89 d8 mov %ebx,%eax
10c995: 8b 5d fc mov -0x4(%ebp),%ebx
10c998: c9 leave
10c999: c3 ret
0010c99c <timer_gettime>:
int timer_gettime(
timer_t timerid,
struct itimerspec *value
)
{
10c99c: 55 push %ebp
10c99d: 89 e5 mov %esp,%ebp
10c99f: 56 push %esi
10c9a0: 53 push %ebx
10c9a1: 83 ec 10 sub $0x10,%esp
10c9a4: 8b 5d 0c mov 0xc(%ebp),%ebx
POSIX_Timer_Control *ptimer;
Objects_Locations location;
struct timespec current_time;
Watchdog_Interval left;
if ( !value )
10c9a7: 85 db test %ebx,%ebx
10c9a9: 74 65 je 10ca10 <timer_gettime+0x74>
rtems_set_errno_and_return_minus_one( EINVAL );
/* Reads the current time */
_TOD_Get( ¤t_time );
10c9ab: 83 ec 0c sub $0xc,%esp
10c9ae: 8d 45 ec lea -0x14(%ebp),%eax
10c9b1: 50 push %eax
10c9b2: e8 fd 16 00 00 call 10e0b4 <_TOD_Get>
10c9b7: 83 c4 0c add $0xc,%esp
ptimer = _POSIX_Timer_Get( timerid, &location );
10c9ba: 8d 45 f4 lea -0xc(%ebp),%eax
10c9bd: 50 push %eax
10c9be: ff 75 08 pushl 0x8(%ebp)
10c9c1: 68 80 ba 12 00 push $0x12ba80
10c9c6: e8 b9 20 00 00 call 10ea84 <_Objects_Get>
10c9cb: 89 c6 mov %eax,%esi
switch ( location ) {
10c9cd: 83 c4 10 add $0x10,%esp
10c9d0: 8b 45 f4 mov -0xc(%ebp),%eax
10c9d3: 85 c0 test %eax,%eax
10c9d5: 75 39 jne 10ca10 <timer_gettime+0x74>
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
10c9d7: a1 64 b8 12 00 mov 0x12b864,%eax
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
10c9dc: 83 ec 08 sub $0x8,%esp
10c9df: 8d 53 08 lea 0x8(%ebx),%edx
10c9e2: 52 push %edx
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
10c9e3: 8b 56 1c mov 0x1c(%esi),%edx
10c9e6: 03 56 24 add 0x24(%esi),%edx
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
10c9e9: 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 );
10c9eb: 52 push %edx
10c9ec: e8 af 36 00 00 call 1100a0 <_Timespec_From_ticks>
value->it_interval = ptimer->timer_data.it_interval;
10c9f1: 8b 46 54 mov 0x54(%esi),%eax
10c9f4: 8b 56 58 mov 0x58(%esi),%edx
10c9f7: 89 03 mov %eax,(%ebx)
10c9f9: 89 53 04 mov %edx,0x4(%ebx)
_Thread_Enable_dispatch();
10c9fc: e8 0b 2c 00 00 call 10f60c <_Thread_Enable_dispatch>
return 0;
10ca01: 83 c4 10 add $0x10,%esp
10ca04: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10ca06: 8d 65 f8 lea -0x8(%ebp),%esp
10ca09: 5b pop %ebx
10ca0a: 5e pop %esi
10ca0b: c9 leave
10ca0c: c3 ret
10ca0d: 8d 76 00 lea 0x0(%esi),%esi
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10ca10: e8 ff 87 00 00 call 115214 <__errno>
10ca15: c7 00 16 00 00 00 movl $0x16,(%eax)
10ca1b: b8 ff ff ff ff mov $0xffffffff,%eax
10ca20: eb e4 jmp 10ca06 <timer_gettime+0x6a>
0010b668 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
10b668: 55 push %ebp
10b669: 89 e5 mov %esp,%ebp
10b66b: 57 push %edi
10b66c: 56 push %esi
10b66d: 53 push %ebx
10b66e: 83 ec 3c sub $0x3c,%esp
10b671: 8b 5d 10 mov 0x10(%ebp),%ebx
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
10b674: 85 db test %ebx,%ebx
10b676: 0f 84 50 01 00 00 je 10b7cc <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) ) ) {
10b67c: 83 ec 0c sub $0xc,%esp
10b67f: 8d 43 08 lea 0x8(%ebx),%eax
10b682: 50 push %eax
10b683: e8 a8 38 00 00 call 10ef30 <_Timespec_Is_valid>
10b688: 83 c4 10 add $0x10,%esp
10b68b: 84 c0 test %al,%al
10b68d: 0f 84 39 01 00 00 je 10b7cc <timer_settime+0x164>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
10b693: 83 ec 0c sub $0xc,%esp
10b696: 53 push %ebx
10b697: e8 94 38 00 00 call 10ef30 <_Timespec_Is_valid>
10b69c: 83 c4 10 add $0x10,%esp
10b69f: 84 c0 test %al,%al
10b6a1: 0f 84 25 01 00 00 je 10b7cc <timer_settime+0x164> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
10b6a7: 83 7d 0c 04 cmpl $0x4,0xc(%ebp)
10b6ab: 0f 84 db 00 00 00 je 10b78c <timer_settime+0x124>
10b6b1: 8b 45 0c mov 0xc(%ebp),%eax
10b6b4: 85 c0 test %eax,%eax
10b6b6: 0f 85 10 01 00 00 jne 10b7cc <timer_settime+0x164>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10b6bc: 8d 45 cc lea -0x34(%ebp),%eax
10b6bf: 89 45 c4 mov %eax,-0x3c(%ebp)
10b6c2: b9 04 00 00 00 mov $0x4,%ecx
10b6c7: 89 c7 mov %eax,%edi
10b6c9: 89 de mov %ebx,%esi
10b6cb: 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 );
10b6cd: 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 );
10b6ce: 8d 45 e4 lea -0x1c(%ebp),%eax
10b6d1: 50 push %eax
10b6d2: ff 75 08 pushl 0x8(%ebp)
10b6d5: 68 e0 a4 12 00 push $0x12a4e0
10b6da: e8 11 22 00 00 call 10d8f0 <_Objects_Get>
10b6df: 89 c2 mov %eax,%edx
switch ( location ) {
10b6e1: 83 c4 10 add $0x10,%esp
10b6e4: 8b 7d e4 mov -0x1c(%ebp),%edi
10b6e7: 85 ff test %edi,%edi
10b6e9: 0f 85 dd 00 00 00 jne 10b7cc <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 ) {
10b6ef: 8b 75 d4 mov -0x2c(%ebp),%esi
10b6f2: 85 f6 test %esi,%esi
10b6f4: 75 0b jne 10b701 <timer_settime+0x99>
10b6f6: 8b 4d d8 mov -0x28(%ebp),%ecx
10b6f9: 85 c9 test %ecx,%ecx
10b6fb: 0f 84 df 00 00 00 je 10b7e0 <timer_settime+0x178>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
10b701: 83 ec 0c sub $0xc,%esp
10b704: 53 push %ebx
10b705: 89 55 c0 mov %edx,-0x40(%ebp)
10b708: e8 8b 38 00 00 call 10ef98 <_Timespec_To_ticks>
10b70d: 8b 55 c0 mov -0x40(%ebp),%edx
10b710: 89 42 64 mov %eax,0x64(%edx)
initial_period = _Timespec_To_ticks( &normalize.it_value );
10b713: 8d 45 d4 lea -0x2c(%ebp),%eax
10b716: 89 04 24 mov %eax,(%esp)
10b719: e8 7a 38 00 00 call 10ef98 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
10b71e: 8b 55 c0 mov -0x40(%ebp),%edx
10b721: 89 14 24 mov %edx,(%esp)
10b724: 68 4c b8 10 00 push $0x10b84c
10b729: ff 72 08 pushl 0x8(%edx)
10b72c: 50 push %eax
10b72d: 8d 42 10 lea 0x10(%edx),%eax
10b730: 50 push %eax
10b731: e8 82 61 00 00 call 1118b8 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
10b736: 83 c4 20 add $0x20,%esp
10b739: 84 c0 test %al,%al
10b73b: 8b 55 c0 mov -0x40(%ebp),%edx
10b73e: 0f 84 e8 00 00 00 je 10b82c <timer_settime+0x1c4>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
10b744: 8b 45 14 mov 0x14(%ebp),%eax
10b747: 85 c0 test %eax,%eax
10b749: 0f 84 ed 00 00 00 je 10b83c <timer_settime+0x1d4>
*ovalue = ptimer->timer_data;
10b74f: 8d 42 54 lea 0x54(%edx),%eax
10b752: b9 04 00 00 00 mov $0x4,%ecx
10b757: 8b 7d 14 mov 0x14(%ebp),%edi
10b75a: 89 c6 mov %eax,%esi
10b75c: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
ptimer->timer_data = normalize;
10b75e: b9 04 00 00 00 mov $0x4,%ecx
10b763: 89 c7 mov %eax,%edi
10b765: 8b 75 c4 mov -0x3c(%ebp),%esi
10b768: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
10b76a: c6 42 3c 03 movb $0x3,0x3c(%edx)
_TOD_Get( &ptimer->time );
10b76e: 83 ec 0c sub $0xc,%esp
10b771: 83 c2 6c add $0x6c,%edx
10b774: 52 push %edx
10b775: e8 ca 17 00 00 call 10cf44 <_TOD_Get>
_Thread_Enable_dispatch();
10b77a: e8 f9 2c 00 00 call 10e478 <_Thread_Enable_dispatch>
return 0;
10b77f: 83 c4 10 add $0x10,%esp
10b782: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b784: 8d 65 f4 lea -0xc(%ebp),%esp
10b787: 5b pop %ebx
10b788: 5e pop %esi
10b789: 5f pop %edi
10b78a: c9 leave
10b78b: c3 ret
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
10b78c: 8d 45 cc lea -0x34(%ebp),%eax
10b78f: 89 45 c4 mov %eax,-0x3c(%ebp)
10b792: 89 c7 mov %eax,%edi
10b794: 89 de mov %ebx,%esi
10b796: 8b 4d 0c mov 0xc(%ebp),%ecx
10b799: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
10b79b: 83 ec 0c sub $0xc,%esp
10b79e: 8d 75 dc lea -0x24(%ebp),%esi
10b7a1: 56 push %esi
10b7a2: e8 9d 17 00 00 call 10cf44 <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
10b7a7: 59 pop %ecx
10b7a8: 5f pop %edi
10b7a9: 8d 7d d4 lea -0x2c(%ebp),%edi
10b7ac: 57 push %edi
10b7ad: 56 push %esi
10b7ae: e8 59 37 00 00 call 10ef0c <_Timespec_Greater_than>
10b7b3: 83 c4 10 add $0x10,%esp
10b7b6: 84 c0 test %al,%al
10b7b8: 75 12 jne 10b7cc <timer_settime+0x164>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
10b7ba: 52 push %edx
10b7bb: 57 push %edi
10b7bc: 57 push %edi
10b7bd: 56 push %esi
10b7be: e8 95 37 00 00 call 10ef58 <_Timespec_Subtract>
10b7c3: 83 c4 10 add $0x10,%esp
10b7c6: e9 02 ff ff ff jmp 10b6cd <timer_settime+0x65>
10b7cb: 90 nop
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
10b7cc: e8 c3 88 00 00 call 114094 <__errno>
10b7d1: c7 00 16 00 00 00 movl $0x16,(%eax)
10b7d7: b8 ff ff ff ff mov $0xffffffff,%eax
10b7dc: eb a6 jmp 10b784 <timer_settime+0x11c>
10b7de: 66 90 xchg %ax,%ax
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 );
10b7e0: 83 ec 0c sub $0xc,%esp
10b7e3: 8d 40 10 lea 0x10(%eax),%eax
10b7e6: 50 push %eax
10b7e7: 89 55 c0 mov %edx,-0x40(%ebp)
10b7ea: e8 dd 3b 00 00 call 10f3cc <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
10b7ef: 83 c4 10 add $0x10,%esp
10b7f2: 8b 55 14 mov 0x14(%ebp),%edx
10b7f5: 85 d2 test %edx,%edx
10b7f7: 8b 55 c0 mov -0x40(%ebp),%edx
10b7fa: 74 48 je 10b844 <timer_settime+0x1dc>
*ovalue = ptimer->timer_data;
10b7fc: 8d 42 54 lea 0x54(%edx),%eax
10b7ff: b9 04 00 00 00 mov $0x4,%ecx
10b804: 8b 7d 14 mov 0x14(%ebp),%edi
10b807: 89 c6 mov %eax,%esi
10b809: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* The new data are set */
ptimer->timer_data = normalize;
10b80b: b9 04 00 00 00 mov $0x4,%ecx
10b810: 89 c7 mov %eax,%edi
10b812: 8b 75 c4 mov -0x3c(%ebp),%esi
10b815: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
10b817: c6 42 3c 04 movb $0x4,0x3c(%edx)
/* Returns with success */
_Thread_Enable_dispatch();
10b81b: e8 58 2c 00 00 call 10e478 <_Thread_Enable_dispatch>
return 0;
10b820: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b822: 8d 65 f4 lea -0xc(%ebp),%esp
10b825: 5b pop %ebx
10b826: 5e pop %esi
10b827: 5f pop %edi
10b828: c9 leave
10b829: c3 ret
10b82a: 66 90 xchg %ax,%ax
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
10b82c: e8 47 2c 00 00 call 10e478 <_Thread_Enable_dispatch>
return 0;
10b831: 31 c0 xor %eax,%eax
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
10b833: 8d 65 f4 lea -0xc(%ebp),%esp
10b836: 5b pop %ebx
10b837: 5e pop %esi
10b838: 5f pop %edi
10b839: c9 leave
10b83a: c3 ret
10b83b: 90 nop
10b83c: 8d 42 54 lea 0x54(%edx),%eax
10b83f: e9 1a ff ff ff jmp 10b75e <timer_settime+0xf6>
10b844: 8d 42 54 lea 0x54(%edx),%eax
10b847: eb c2 jmp 10b80b <timer_settime+0x1a3>
0010b458 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
10b458: 55 push %ebp
10b459: 89 e5 mov %esp,%ebp
10b45b: 56 push %esi
10b45c: 53 push %ebx
10b45d: 83 ec 10 sub $0x10,%esp
10b460: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
10b463: 8b 0d fc a6 12 00 mov 0x12a6fc,%ecx
10b469: 85 c9 test %ecx,%ecx
10b46b: 0f 84 8f 00 00 00 je 10b500 <ualarm+0xa8>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
10b471: 83 ec 0c sub $0xc,%esp
10b474: 68 e0 a6 12 00 push $0x12a6e0
10b479: e8 ae 3a 00 00 call 10ef2c <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
10b47e: 83 e8 02 sub $0x2,%eax
10b481: 83 c4 10 add $0x10,%esp
10b484: 83 f8 01 cmp $0x1,%eax
10b487: 0f 86 a3 00 00 00 jbe 10b530 <ualarm+0xd8> <== ALWAYS TAKEN
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
10b48d: 31 f6 xor %esi,%esi
/*
* 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 ) {
10b48f: 85 db test %ebx,%ebx
10b491: 74 62 je 10b4f5 <ualarm+0x9d>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
10b493: ba 83 de 1b 43 mov $0x431bde83,%edx
10b498: 89 d8 mov %ebx,%eax
10b49a: f7 e2 mul %edx
10b49c: c1 ea 12 shr $0x12,%edx
10b49f: 89 55 f0 mov %edx,-0x10(%ebp)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
10b4a2: 8d 04 92 lea (%edx,%edx,4),%eax
10b4a5: 8d 04 80 lea (%eax,%eax,4),%eax
10b4a8: 8d 04 80 lea (%eax,%eax,4),%eax
10b4ab: 8d 04 80 lea (%eax,%eax,4),%eax
10b4ae: 8d 04 80 lea (%eax,%eax,4),%eax
10b4b1: 8d 04 80 lea (%eax,%eax,4),%eax
10b4b4: c1 e0 06 shl $0x6,%eax
10b4b7: 29 c3 sub %eax,%ebx
10b4b9: 8d 04 9b lea (%ebx,%ebx,4),%eax
10b4bc: 8d 04 80 lea (%eax,%eax,4),%eax
10b4bf: 8d 04 80 lea (%eax,%eax,4),%eax
10b4c2: c1 e0 03 shl $0x3,%eax
10b4c5: 89 45 f4 mov %eax,-0xc(%ebp)
ticks = _Timespec_To_ticks( &tp );
10b4c8: 83 ec 0c sub $0xc,%esp
10b4cb: 8d 5d f0 lea -0x10(%ebp),%ebx
10b4ce: 53 push %ebx
10b4cf: e8 ac 35 00 00 call 10ea80 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
10b4d4: 89 1c 24 mov %ebx,(%esp)
10b4d7: e8 a4 35 00 00 call 10ea80 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
10b4dc: a3 ec a6 12 00 mov %eax,0x12a6ec
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
10b4e1: 58 pop %eax
10b4e2: 5a pop %edx
10b4e3: 68 e0 a6 12 00 push $0x12a6e0
10b4e8: 68 00 9e 12 00 push $0x129e00
10b4ed: e8 fa 38 00 00 call 10edec <_Watchdog_Insert>
10b4f2: 83 c4 10 add $0x10,%esp
}
return remaining;
}
10b4f5: 89 f0 mov %esi,%eax
10b4f7: 8d 65 f8 lea -0x8(%ebp),%esp
10b4fa: 5b pop %ebx
10b4fb: 5e pop %esi
10b4fc: c9 leave
10b4fd: c3 ret
10b4fe: 66 90 xchg %ax,%ax
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
10b500: c7 05 e8 a6 12 00 00 movl $0x0,0x12a6e8
10b507: 00 00 00
the_watchdog->routine = routine;
10b50a: c7 05 fc a6 12 00 1c movl $0x10b41c,0x12a6fc
10b511: b4 10 00
the_watchdog->id = id;
10b514: c7 05 00 a7 12 00 00 movl $0x0,0x12a700
10b51b: 00 00 00
the_watchdog->user_data = user_data;
10b51e: c7 05 04 a7 12 00 00 movl $0x0,0x12a704
10b525: 00 00 00
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
10b528: 31 f6 xor %esi,%esi
10b52a: e9 60 ff ff ff jmp 10b48f <ualarm+0x37>
10b52f: 90 nop
* 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);
10b530: a1 f4 a6 12 00 mov 0x12a6f4,%eax
10b535: 03 05 ec a6 12 00 add 0x12a6ec,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10b53b: 83 ec 08 sub $0x8,%esp
10b53e: 8d 55 f0 lea -0x10(%ebp),%edx
10b541: 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);
10b542: 2b 05 f8 a6 12 00 sub 0x12a6f8,%eax
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
10b548: 50 push %eax
10b549: e8 aa 34 00 00 call 10e9f8 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
10b54e: 8b 45 f0 mov -0x10(%ebp),%eax
10b551: 8d 04 80 lea (%eax,%eax,4),%eax
10b554: 8d 04 80 lea (%eax,%eax,4),%eax
10b557: 8d 04 80 lea (%eax,%eax,4),%eax
10b55a: 8d 04 80 lea (%eax,%eax,4),%eax
10b55d: 8d 04 80 lea (%eax,%eax,4),%eax
10b560: 8d 0c 80 lea (%eax,%eax,4),%ecx
10b563: c1 e1 06 shl $0x6,%ecx
remaining += tp.tv_nsec / 1000;
10b566: 8b 75 f4 mov -0xc(%ebp),%esi
10b569: b8 d3 4d 62 10 mov $0x10624dd3,%eax
10b56e: f7 ee imul %esi
10b570: 89 d0 mov %edx,%eax
10b572: c1 f8 06 sar $0x6,%eax
10b575: c1 fe 1f sar $0x1f,%esi
10b578: 29 f0 sub %esi,%eax
10b57a: 8d 34 08 lea (%eax,%ecx,1),%esi
10b57d: 83 c4 10 add $0x10,%esp
10b580: e9 0a ff ff ff jmp 10b48f <ualarm+0x37>
0010bbdc <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
10bbdc: 55 push %ebp
10bbdd: 89 e5 mov %esp,%ebp
10bbdf: 57 push %edi
10bbe0: 56 push %esi
10bbe1: 53 push %ebx
10bbe2: 83 ec 58 sub $0x58,%esp
10bbe5: 8b 5d 08 mov 0x8(%ebp),%ebx
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
10bbe8: 53 push %ebx
10bbe9: e8 16 d3 ff ff call 108f04 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
10bbee: 83 c4 10 add $0x10,%esp
10bbf1: 85 c0 test %eax,%eax
10bbf3: 0f 85 d3 00 00 00 jne 10bccc <unlink+0xf0>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
10bbf9: 50 push %eax
10bbfa: 8d 45 d0 lea -0x30(%ebp),%eax
10bbfd: 89 45 b4 mov %eax,-0x4c(%ebp)
10bc00: 50 push %eax
10bc01: 8d 45 e4 lea -0x1c(%ebp),%eax
10bc04: 50 push %eax
10bc05: 53 push %ebx
10bc06: e8 b9 e2 ff ff call 109ec4 <rtems_filesystem_get_start_loc>
10bc0b: 83 c4 10 add $0x10,%esp
10bc0e: 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;
10bc10: c6 45 b3 00 movb $0x0,-0x4d(%ebp)
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
10bc14: 8d 7d bc lea -0x44(%ebp),%edi
10bc17: b9 05 00 00 00 mov $0x5,%ecx
10bc1c: 8b 75 b4 mov -0x4c(%ebp),%esi
10bc1f: f3 a5 rep movsl %ds:(%esi),%es:(%edi)
name = path + parentpathlen;
10bc21: 01 d3 add %edx,%ebx
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
10bc23: be ff ff ff ff mov $0xffffffff,%esi
10bc28: 89 f1 mov %esi,%ecx
10bc2a: 89 df mov %ebx,%edi
10bc2c: 31 c0 xor %eax,%eax
10bc2e: f2 ae repnz scas %es:(%edi),%al
10bc30: f7 d1 not %ecx
10bc32: 49 dec %ecx
10bc33: 83 ec 08 sub $0x8,%esp
10bc36: 51 push %ecx
10bc37: 53 push %ebx
10bc38: e8 0b d3 ff ff call 108f48 <rtems_filesystem_prefix_separators>
10bc3d: 01 c3 add %eax,%ebx
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
10bc3f: 89 f1 mov %esi,%ecx
10bc41: 89 df mov %ebx,%edi
10bc43: 31 c0 xor %eax,%eax
10bc45: f2 ae repnz scas %es:(%edi),%al
10bc47: f7 d1 not %ecx
10bc49: 49 dec %ecx
10bc4a: c7 04 24 00 00 00 00 movl $0x0,(%esp)
10bc51: 8d 75 bc lea -0x44(%ebp),%esi
10bc54: 56 push %esi
10bc55: 6a 00 push $0x0
10bc57: 51 push %ecx
10bc58: 53 push %ebx
10bc59: e8 fa d1 ff ff call 108e58 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
10bc5e: 83 c4 20 add $0x20,%esp
10bc61: 85 c0 test %eax,%eax
10bc63: 75 53 jne 10bcb8 <unlink+0xdc>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
10bc65: 83 ec 0c sub $0xc,%esp
10bc68: 56 push %esi
10bc69: 8b 45 c8 mov -0x38(%ebp),%eax
10bc6c: ff 50 10 call *0x10(%eax)
10bc6f: 83 c4 10 add $0x10,%esp
10bc72: 48 dec %eax
10bc73: 0f 84 83 00 00 00 je 10bcfc <unlink+0x120>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
10bc79: 83 ec 08 sub $0x8,%esp
10bc7c: 56 push %esi
10bc7d: ff 75 b4 pushl -0x4c(%ebp)
10bc80: 8b 45 c8 mov -0x38(%ebp),%eax
10bc83: ff 50 0c call *0xc(%eax)
rtems_filesystem_freenode( &loc );
10bc86: 89 34 24 mov %esi,(%esp)
10bc89: 89 45 ac mov %eax,-0x54(%ebp)
10bc8c: e8 07 d3 ff ff call 108f98 <rtems_filesystem_freenode>
if ( free_parentloc )
10bc91: 83 c4 10 add $0x10,%esp
10bc94: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
10bc98: 8b 45 ac mov -0x54(%ebp),%eax
10bc9b: 74 11 je 10bcae <unlink+0xd2>
rtems_filesystem_freenode( &parentloc );
10bc9d: 83 ec 0c sub $0xc,%esp
10bca0: ff 75 b4 pushl -0x4c(%ebp)
10bca3: e8 f0 d2 ff ff call 108f98 <rtems_filesystem_freenode>
10bca8: 83 c4 10 add $0x10,%esp
10bcab: 8b 45 ac mov -0x54(%ebp),%eax
return result;
}
10bcae: 8d 65 f4 lea -0xc(%ebp),%esp
10bcb1: 5b pop %ebx
10bcb2: 5e pop %esi
10bcb3: 5f pop %edi
10bcb4: c9 leave
10bcb5: c3 ret
10bcb6: 66 90 xchg %ax,%ax
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 )
10bcb8: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
10bcbc: 75 70 jne 10bd2e <unlink+0x152> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
return -1;
10bcbe: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
10bcc3: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED
10bcc6: 5b pop %ebx <== NOT EXECUTED
10bcc7: 5e pop %esi <== NOT EXECUTED
10bcc8: 5f pop %edi <== NOT EXECUTED
10bcc9: c9 leave <== NOT EXECUTED
10bcca: c3 ret <== NOT EXECUTED
10bccb: 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,
10bccc: 89 c2 mov %eax,%edx
10bcce: 83 ec 0c sub $0xc,%esp
10bcd1: 6a 00 push $0x0
10bcd3: 8d 45 d0 lea -0x30(%ebp),%eax
10bcd6: 89 45 b4 mov %eax,-0x4c(%ebp)
10bcd9: 50 push %eax
10bcda: 6a 02 push $0x2
10bcdc: 52 push %edx
10bcdd: 53 push %ebx
10bcde: 89 55 ac mov %edx,-0x54(%ebp)
10bce1: e8 da d1 ff ff call 108ec0 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
10bce6: 83 c4 20 add $0x20,%esp
10bce9: 85 c0 test %eax,%eax
10bceb: 8b 55 ac mov -0x54(%ebp),%edx
10bcee: 75 ce jne 10bcbe <unlink+0xe2> <== NEVER TAKEN
return -1;
free_parentloc = true;
10bcf0: c6 45 b3 01 movb $0x1,-0x4d(%ebp)
10bcf4: e9 1b ff ff ff jmp 10bc14 <unlink+0x38>
10bcf9: 8d 76 00 lea 0x0(%esi),%esi
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
10bcfc: 83 ec 0c sub $0xc,%esp
10bcff: 56 push %esi
10bd00: e8 93 d2 ff ff call 108f98 <rtems_filesystem_freenode>
if ( free_parentloc )
10bd05: 83 c4 10 add $0x10,%esp
10bd08: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp)
10bd0c: 74 0e je 10bd1c <unlink+0x140>
rtems_filesystem_freenode( &parentloc );
10bd0e: 83 ec 0c sub $0xc,%esp
10bd11: ff 75 b4 pushl -0x4c(%ebp)
10bd14: e8 7f d2 ff ff call 108f98 <rtems_filesystem_freenode>
10bd19: 83 c4 10 add $0x10,%esp
rtems_set_errno_and_return_minus_one( EISDIR );
10bd1c: e8 87 b3 00 00 call 1170a8 <__errno>
10bd21: c7 00 15 00 00 00 movl $0x15,(%eax)
10bd27: b8 ff ff ff ff mov $0xffffffff,%eax
10bd2c: eb 80 jmp 10bcae <unlink+0xd2>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
10bd2e: 83 ec 0c sub $0xc,%esp
10bd31: ff 75 b4 pushl -0x4c(%ebp)
10bd34: e8 5f d2 ff ff call 108f98 <rtems_filesystem_freenode>
10bd39: 83 c4 10 add $0x10,%esp
return -1;
10bd3c: b8 ff ff ff ff mov $0xffffffff,%eax
10bd41: e9 68 ff ff ff jmp 10bcae <unlink+0xd2>
0010bdac <unmount>:
*/
int unmount(
const char *path
)
{
10bdac: 55 push %ebp
10bdad: 89 e5 mov %esp,%ebp
10bdaf: 57 push %edi
10bdb0: 56 push %esi
10bdb1: 53 push %ebx
10bdb2: 83 ec 38 sub $0x38,%esp
10bdb5: 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 ) )
10bdb8: 31 c0 xor %eax,%eax
10bdba: b9 ff ff ff ff mov $0xffffffff,%ecx
10bdbf: 89 d7 mov %edx,%edi
10bdc1: f2 ae repnz scas %es:(%edi),%al
10bdc3: f7 d1 not %ecx
10bdc5: 49 dec %ecx
10bdc6: 6a 01 push $0x1
10bdc8: 8d 75 d4 lea -0x2c(%ebp),%esi
10bdcb: 56 push %esi
10bdcc: 6a 00 push $0x0
10bdce: 51 push %ecx
10bdcf: 52 push %edx
10bdd0: e8 4f cf ff ff call 108d24 <rtems_filesystem_evaluate_path>
10bdd5: 83 c4 20 add $0x20,%esp
10bdd8: 85 c0 test %eax,%eax
10bdda: 75 68 jne 10be44 <unmount+0x98>
return -1;
mt_entry = loc.mt_entry;
10bddc: 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 ){
10bddf: 8b 45 d4 mov -0x2c(%ebp),%eax
10bde2: 39 43 1c cmp %eax,0x1c(%ebx)
10bde5: 0f 85 c5 00 00 00 jne 10beb0 <unmount+0x104>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
10bdeb: 83 ec 0c sub $0xc,%esp
10bdee: 56 push %esi
10bdef: e8 08 d0 ff ff call 108dfc <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 )
10bdf4: 83 c4 10 add $0x10,%esp
10bdf7: a1 10 86 12 00 mov 0x128610,%eax
10bdfc: 39 58 14 cmp %ebx,0x14(%eax)
10bdff: 0f 84 cf 00 00 00 je 10bed4 <unmount+0x128>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
10be05: 83 ec 08 sub $0x8,%esp
10be08: ff 73 2c pushl 0x2c(%ebx)
10be0b: 68 98 bd 10 00 push $0x10bd98
10be10: e8 ab d7 ff ff call 1095c0 <rtems_filesystem_mount_iterate>
10be15: 83 c4 10 add $0x10,%esp
10be18: 84 c0 test %al,%al
10be1a: 0f 85 b4 00 00 00 jne 10bed4 <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 )
10be20: 83 ec 0c sub $0xc,%esp
10be23: 53 push %ebx
10be24: e8 03 d3 ff ff call 10912c <rtems_libio_is_open_files_in_fs>
10be29: 83 c4 10 add $0x10,%esp
10be2c: 48 dec %eax
10be2d: 0f 84 a1 00 00 00 je 10bed4 <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 )
10be33: 83 ec 0c sub $0xc,%esp
10be36: 8b 43 14 mov 0x14(%ebx),%eax
10be39: 53 push %ebx
10be3a: ff 50 28 call *0x28(%eax)
10be3d: 83 c4 10 add $0x10,%esp
10be40: 85 c0 test %eax,%eax
10be42: 74 10 je 10be54 <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;
10be44: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10be49: 8d 65 f4 lea -0xc(%ebp),%esp
10be4c: 5b pop %ebx
10be4d: 5e pop %esi
10be4e: 5f pop %edi
10be4f: c9 leave
10be50: c3 ret
10be51: 8d 76 00 lea 0x0(%esi),%esi
* 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){
10be54: 83 ec 0c sub $0xc,%esp
10be57: 8b 43 28 mov 0x28(%ebx),%eax
10be5a: 53 push %ebx
10be5b: ff 50 2c call *0x2c(%eax)
10be5e: 83 c4 10 add $0x10,%esp
10be61: 85 c0 test %eax,%eax
10be63: 0f 85 83 00 00 00 jne 10beec <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 );
10be69: 52 push %edx
10be6a: 6a 00 push $0x0
10be6c: 6a 00 push $0x0
10be6e: ff 35 48 a9 12 00 pushl 0x12a948
10be74: e8 77 0b 00 00 call 10c9f0 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
10be79: 89 1c 24 mov %ebx,(%esp)
10be7c: e8 73 14 00 00 call 10d2f4 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
10be81: 58 pop %eax
10be82: ff 35 48 a9 12 00 pushl 0x12a948
10be88: e8 5f 0c 00 00 call 10caec <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;
10be8d: 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 );
10be90: 89 04 24 mov %eax,(%esp)
10be93: e8 64 cf ff ff call 108dfc <rtems_filesystem_freenode>
free( mt_entry );
10be98: 89 1c 24 mov %ebx,(%esp)
10be9b: e8 70 cf ff ff call 108e10 <free>
return 0;
10bea0: 83 c4 10 add $0x10,%esp
10bea3: 31 c0 xor %eax,%eax
}
10bea5: 8d 65 f4 lea -0xc(%ebp),%esp
10bea8: 5b pop %ebx
10bea9: 5e pop %esi
10beaa: 5f pop %edi
10beab: c9 leave
10beac: c3 ret
10bead: 8d 76 00 lea 0x0(%esi),%esi
/*
* 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 );
10beb0: 83 ec 0c sub $0xc,%esp
10beb3: 56 push %esi
10beb4: e8 43 cf ff ff call 108dfc <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
10beb9: e8 76 84 00 00 call 114334 <__errno>
10bebe: c7 00 0d 00 00 00 movl $0xd,(%eax)
10bec4: 83 c4 10 add $0x10,%esp
10bec7: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10becc: 8d 65 f4 lea -0xc(%ebp),%esp
10becf: 5b pop %ebx
10bed0: 5e pop %esi
10bed1: 5f pop %edi
10bed2: c9 leave
10bed3: 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 );
10bed4: e8 5b 84 00 00 call 114334 <__errno>
10bed9: c7 00 10 00 00 00 movl $0x10,(%eax)
10bedf: b8 ff ff ff ff mov $0xffffffff,%eax
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
10bee4: 8d 65 f4 lea -0xc(%ebp),%esp
10bee7: 5b pop %ebx
10bee8: 5e pop %esi
10bee9: 5f pop %edi
10beea: c9 leave
10beeb: 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 )
10beec: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10beef: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED
10bef2: 53 push %ebx <== NOT EXECUTED
10bef3: ff 50 20 call *0x20(%eax) <== NOT EXECUTED
10bef6: 83 c4 10 add $0x10,%esp <== NOT EXECUTED
10bef9: 85 c0 test %eax,%eax <== NOT EXECUTED
10befb: 0f 84 43 ff ff ff je 10be44 <unmount+0x98> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
10bf01: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED
10bf04: 6a 00 push $0x0 <== NOT EXECUTED
10bf06: e8 e1 10 00 00 call 10cfec <rtems_fatal_error_occurred><== NOT EXECUTED
0010bf54 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
10bf54: 55 push %ebp
10bf55: 89 e5 mov %esp,%ebp
10bf57: 57 push %edi
10bf58: 56 push %esi
10bf59: 53 push %ebx
10bf5a: 83 ec 48 sub $0x48,%esp
10bf5d: 8b 55 08 mov 0x8(%ebp),%edx
10bf60: 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 ) )
10bf63: 31 c0 xor %eax,%eax
10bf65: b9 ff ff ff ff mov $0xffffffff,%ecx
10bf6a: 89 d7 mov %edx,%edi
10bf6c: f2 ae repnz scas %es:(%edi),%al
10bf6e: f7 d1 not %ecx
10bf70: 49 dec %ecx
10bf71: 6a 01 push $0x1
10bf73: 8d 75 d4 lea -0x2c(%ebp),%esi
10bf76: 56 push %esi
10bf77: 6a 00 push $0x0
10bf79: 51 push %ecx
10bf7a: 52 push %edx
10bf7b: e8 a8 ca ff ff call 108a28 <rtems_filesystem_evaluate_path>
10bf80: 83 c4 20 add $0x20,%esp
10bf83: 85 c0 test %eax,%eax
10bf85: 75 2d jne 10bfb4 <utime+0x60>
return -1;
if ( times == NULL ) {
10bf87: 85 db test %ebx,%ebx
10bf89: 74 39 je 10bfc4 <utime+0x70>
10bf8b: 8b 53 04 mov 0x4(%ebx),%edx
10bf8e: 8b 03 mov (%ebx),%eax
now.actime = now.modtime = time( NULL );
times = &now;
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
10bf90: 51 push %ecx
10bf91: 52 push %edx
10bf92: 50 push %eax
10bf93: 56 push %esi
10bf94: 8b 45 e0 mov -0x20(%ebp),%eax
10bf97: ff 50 30 call *0x30(%eax)
rtems_filesystem_freenode( &temp_loc );
10bf9a: 89 34 24 mov %esi,(%esp)
10bf9d: 89 45 c4 mov %eax,-0x3c(%ebp)
10bfa0: e8 73 ce ff ff call 108e18 <rtems_filesystem_freenode>
return result;
10bfa5: 83 c4 10 add $0x10,%esp
10bfa8: 8b 45 c4 mov -0x3c(%ebp),%eax
}
10bfab: 8d 65 f4 lea -0xc(%ebp),%esp
10bfae: 5b pop %ebx
10bfaf: 5e pop %esi
10bfb0: 5f pop %edi
10bfb1: c9 leave
10bfb2: c3 ret
10bfb3: 90 nop
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;
10bfb4: 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;
}
10bfb9: 8d 65 f4 lea -0xc(%ebp),%esp
10bfbc: 5b pop %ebx
10bfbd: 5e pop %esi
10bfbe: 5f pop %edi
10bfbf: c9 leave
10bfc0: c3 ret
10bfc1: 8d 76 00 lea 0x0(%esi),%esi
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( times == NULL ) {
now.actime = now.modtime = time( NULL );
10bfc4: 83 ec 0c sub $0xc,%esp
10bfc7: 6a 00 push $0x0
10bfc9: e8 fa cc 00 00 call 118cc8 <time>
10bfce: 83 c4 10 add $0x10,%esp
10bfd1: 89 c2 mov %eax,%edx
10bfd3: eb bb jmp 10bf90 <utime+0x3c>
0010bfd8 <utimes>:
int utimes(
const char *path,
const struct timeval times[2]
)
{
10bfd8: 55 push %ebp
10bfd9: 89 e5 mov %esp,%ebp
10bfdb: 83 ec 18 sub $0x18,%esp
10bfde: 8b 55 08 mov 0x8(%ebp),%edx
10bfe1: 8b 45 0c mov 0xc(%ebp),%eax
struct utimbuf timeinsecs;
if ( times == NULL )
10bfe4: 85 c0 test %eax,%eax
10bfe6: 74 20 je 10c008 <utimes+0x30> <== NEVER TAKEN
return utime( path, NULL );
timeinsecs.actime = (time_t) times[0].tv_sec;
10bfe8: 8b 08 mov (%eax),%ecx
10bfea: 89 4d f0 mov %ecx,-0x10(%ebp)
timeinsecs.modtime = (time_t) times[1].tv_sec;
10bfed: 8b 40 08 mov 0x8(%eax),%eax
10bff0: 89 45 f4 mov %eax,-0xc(%ebp)
return utime( path, &timeinsecs );
10bff3: 83 ec 08 sub $0x8,%esp
10bff6: 8d 45 f0 lea -0x10(%ebp),%eax
10bff9: 50 push %eax
10bffa: 52 push %edx
10bffb: e8 54 ff ff ff call 10bf54 <utime>
10c000: 83 c4 10 add $0x10,%esp
}
10c003: c9 leave
10c004: c3 ret
10c005: 8d 76 00 lea 0x0(%esi),%esi
)
{
struct utimbuf timeinsecs;
if ( times == NULL )
return utime( path, NULL );
10c008: 83 ec 08 sub $0x8,%esp
10c00b: 6a 00 push $0x0
10c00d: 52 push %edx
10c00e: e8 41 ff ff ff call 10bf54 <utime>
10c013: 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 );
}
10c016: c9 leave
10c017: c3 ret
0010ac14 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
10ac14: 55 push %ebp
10ac15: 89 e5 mov %esp,%ebp
10ac17: 57 push %edi
10ac18: 56 push %esi
10ac19: 53 push %ebx
10ac1a: 83 ec 4c sub $0x4c,%esp
10ac1d: 8b 75 08 mov 0x8(%ebp),%esi
for (; *fmt != '\0'; fmt++) {
10ac20: 8a 06 mov (%esi),%al
10ac22: 84 c0 test %al,%al
10ac24: 75 21 jne 10ac47 <vprintk+0x33>
10ac26: e9 c4 01 00 00 jmp 10adef <vprintk+0x1db>
10ac2b: 90 nop
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
BSP_output_char(*fmt);
10ac2c: 83 ec 0c sub $0xc,%esp
10ac2f: 0f be c0 movsbl %al,%eax
10ac32: 50 push %eax
10ac33: ff 15 a8 3b 12 00 call *0x123ba8
continue;
10ac39: 83 c4 10 add $0x10,%esp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
10ac3c: 46 inc %esi
10ac3d: 8a 06 mov (%esi),%al
10ac3f: 84 c0 test %al,%al
10ac41: 0f 84 a8 01 00 00 je 10adef <vprintk+0x1db>
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
10ac47: 3c 25 cmp $0x25,%al
10ac49: 75 e1 jne 10ac2c <vprintk+0x18>
BSP_output_char(*fmt);
continue;
}
fmt++;
10ac4b: 46 inc %esi
if (*fmt == '0' ) {
10ac4c: 8a 06 mov (%esi),%al
10ac4e: 3c 30 cmp $0x30,%al
10ac50: 0f 84 fe 01 00 00 je 10ae54 <vprintk+0x240>
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
10ac56: b1 20 mov $0x20,%cl
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
10ac58: 3c 2d cmp $0x2d,%al
10ac5a: 0f 84 d8 01 00 00 je 10ae38 <vprintk+0x224>
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
10ac60: 31 ff xor %edi,%edi
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10ac62: 8d 50 d0 lea -0x30(%eax),%edx
10ac65: 80 fa 09 cmp $0x9,%dl
10ac68: 0f 87 de 01 00 00 ja 10ae4c <vprintk+0x238>
10ac6e: 31 db xor %ebx,%ebx
width *= 10;
10ac70: 8d 14 9b lea (%ebx,%ebx,4),%edx
width += ((unsigned) *fmt - '0');
10ac73: 0f be c0 movsbl %al,%eax
10ac76: 8d 5c 50 d0 lea -0x30(%eax,%edx,2),%ebx
fmt++;
10ac7a: 46 inc %esi
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10ac7b: 8a 06 mov (%esi),%al
10ac7d: 8d 50 d0 lea -0x30(%eax),%edx
10ac80: 80 fa 09 cmp $0x9,%dl
10ac83: 76 eb jbe 10ac70 <vprintk+0x5c>
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
10ac85: 3c 6c cmp $0x6c,%al
10ac87: 0f 84 7b 01 00 00 je 10ae08 <vprintk+0x1f4>
10ac8d: 88 c2 mov %al,%dl
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
10ac8f: 80 fa 63 cmp $0x63,%dl
10ac92: 0f 84 7c 01 00 00 je 10ae14 <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' ) {
10ac98: 80 fa 73 cmp $0x73,%dl
10ac9b: 0f 84 bf 01 00 00 je 10ae60 <vprintk+0x24c>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
10aca1: 80 fa 6f cmp $0x6f,%dl
10aca4: 0f 84 4e 01 00 00 je 10adf8 <vprintk+0x1e4>
10acaa: 80 fa 4f cmp $0x4f,%dl
10acad: 0f 84 45 01 00 00 je 10adf8 <vprintk+0x1e4> <== NEVER TAKEN
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
10acb3: 80 fa 69 cmp $0x69,%dl
10acb6: 74 54 je 10ad0c <vprintk+0xf8>
10acb8: 80 fa 49 cmp $0x49,%dl
10acbb: 74 4f je 10ad0c <vprintk+0xf8>
10acbd: 80 fa 64 cmp $0x64,%dl
10acc0: 74 4a je 10ad0c <vprintk+0xf8>
c == 'd' || c == 'D' ) {
10acc2: 80 fa 44 cmp $0x44,%dl
10acc5: 74 45 je 10ad0c <vprintk+0xf8>
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
10acc7: 80 fa 75 cmp $0x75,%dl
10acca: 0f 84 85 02 00 00 je 10af55 <vprintk+0x341>
10acd0: 80 fa 55 cmp $0x55,%dl
10acd3: 0f 84 7c 02 00 00 je 10af55 <vprintk+0x341> <== NEVER TAKEN
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
10acd9: 80 fa 78 cmp $0x78,%dl
10acdc: 0f 84 bd 02 00 00 je 10af9f <vprintk+0x38b>
10ace2: 80 fa 58 cmp $0x58,%dl
10ace5: 0f 84 b4 02 00 00 je 10af9f <vprintk+0x38b> <== NEVER TAKEN
base = 16; sign = false;
} else if ( c == 'p' ) {
10aceb: 80 fa 70 cmp $0x70,%dl
10acee: 0f 84 d3 02 00 00 je 10afc7 <vprintk+0x3b3>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
10acf4: 83 ec 0c sub $0xc,%esp
10acf7: 0f be d2 movsbl %dl,%edx
10acfa: 52 push %edx
10acfb: ff 15 a8 3b 12 00 call *0x123ba8
continue;
10ad01: 83 c4 10 add $0x10,%esp
10ad04: e9 33 ff ff ff jmp 10ac3c <vprintk+0x28>
10ad09: 8d 76 00 lea 0x0(%esi),%esi
/* 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;
10ad0c: b2 01 mov $0x1,%dl
10ad0e: c7 45 c0 0a 00 00 00 movl $0xa,-0x40(%ebp)
} else {
BSP_output_char(c);
continue;
}
printNum(
10ad15: 0f be c9 movsbl %cl,%ecx
10ad18: 89 4d b4 mov %ecx,-0x4c(%ebp)
10ad1b: 8b 45 0c mov 0xc(%ebp),%eax
10ad1e: 8b 38 mov (%eax),%edi
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
10ad20: 83 c0 04 add $0x4,%eax
10ad23: 89 45 0c mov %eax,0xc(%ebp)
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
10ad26: 84 d2 test %dl,%dl
10ad28: 74 08 je 10ad32 <vprintk+0x11e>
10ad2a: 85 ff test %edi,%edi
10ad2c: 0f 88 31 02 00 00 js 10af63 <vprintk+0x34f> <== NEVER TAKEN
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
10ad32: 89 7d b8 mov %edi,-0x48(%ebp)
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10ad35: 8b 45 b8 mov -0x48(%ebp),%eax
10ad38: 31 d2 xor %edx,%edx
10ad3a: f7 75 c0 divl -0x40(%ebp)
10ad3d: 89 c1 mov %eax,%ecx
10ad3f: 85 c0 test %eax,%eax
10ad41: 0f 84 47 02 00 00 je 10af8e <vprintk+0x37a>
10ad47: 8a 55 c0 mov -0x40(%ebp),%dl
10ad4a: 88 55 c4 mov %dl,-0x3c(%ebp)
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
10ad4d: 31 ff xor %edi,%edi
10ad4f: 89 5d b0 mov %ebx,-0x50(%ebp)
10ad52: 8b 5d c0 mov -0x40(%ebp),%ebx
10ad55: 8b 55 b8 mov -0x48(%ebp),%edx
10ad58: eb 06 jmp 10ad60 <vprintk+0x14c>
10ad5a: 66 90 xchg %ax,%ax
while ((n = unsigned_num / base) > 0) {
10ad5c: 89 ca mov %ecx,%edx
10ad5e: 89 c1 mov %eax,%ecx
toPrint[count++] = (char) (unsigned_num - (n * base));
10ad60: 8a 45 c4 mov -0x3c(%ebp),%al
10ad63: f6 e1 mul %cl
10ad65: 28 c2 sub %al,%dl
10ad67: 88 54 3d d4 mov %dl,-0x2c(%ebp,%edi,1)
10ad6b: 47 inc %edi
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10ad6c: 89 c8 mov %ecx,%eax
10ad6e: 31 d2 xor %edx,%edx
10ad70: f7 f3 div %ebx
10ad72: 85 c0 test %eax,%eax
10ad74: 75 e6 jne 10ad5c <vprintk+0x148>
10ad76: 8b 5d b0 mov -0x50(%ebp),%ebx
10ad79: 8d 47 01 lea 0x1(%edi),%eax
10ad7c: 89 45 c4 mov %eax,-0x3c(%ebp)
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
10ad7f: 88 4c 3d d4 mov %cl,-0x2c(%ebp,%edi,1)
for (n=maxwidth ; n > count; n-- )
10ad83: 3b 5d c4 cmp -0x3c(%ebp),%ebx
10ad86: 76 21 jbe 10ada9 <vprintk+0x195>
10ad88: 8b 7d b4 mov -0x4c(%ebp),%edi
10ad8b: 89 75 c0 mov %esi,-0x40(%ebp)
10ad8e: 8b 75 c4 mov -0x3c(%ebp),%esi
10ad91: 8d 76 00 lea 0x0(%esi),%esi
BSP_output_char(lead);
10ad94: 83 ec 0c sub $0xc,%esp
10ad97: 57 push %edi
10ad98: ff 15 a8 3b 12 00 call *0x123ba8
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
10ad9e: 4b dec %ebx
10ad9f: 83 c4 10 add $0x10,%esp
10ada2: 39 f3 cmp %esi,%ebx
10ada4: 77 ee ja 10ad94 <vprintk+0x180>
10ada6: 8b 75 c0 mov -0x40(%ebp),%esi
BSP_output_char(lead);
for (n = 0; n < count; n++) {
10ada9: 8b 45 c4 mov -0x3c(%ebp),%eax
10adac: 85 c0 test %eax,%eax
10adae: 0f 84 88 fe ff ff je 10ac3c <vprintk+0x28> <== NEVER TAKEN
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
10adb4: 8b 55 c4 mov -0x3c(%ebp),%edx
10adb7: 8d 7c 15 d3 lea -0x2d(%ebp,%edx,1),%edi
10adbb: 31 db xor %ebx,%ebx
10adbd: 89 75 c0 mov %esi,-0x40(%ebp)
10adc0: 89 d6 mov %edx,%esi
10adc2: 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)])]);
10adc4: 83 ec 0c sub $0xc,%esp
10adc7: 0f be 07 movsbl (%edi),%eax
10adca: 0f be 80 ca 14 12 00 movsbl 0x1214ca(%eax),%eax
10add1: 50 push %eax
10add2: ff 15 a8 3b 12 00 call *0x123ba8
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
10add8: 43 inc %ebx
10add9: 4f dec %edi
10adda: 83 c4 10 add $0x10,%esp
10addd: 39 f3 cmp %esi,%ebx
10addf: 72 e3 jb 10adc4 <vprintk+0x1b0>
10ade1: 8b 75 c0 mov -0x40(%ebp),%esi
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
10ade4: 46 inc %esi
10ade5: 8a 06 mov (%esi),%al
10ade7: 84 c0 test %al,%al
10ade9: 0f 85 58 fe ff ff jne 10ac47 <vprintk+0x33> <== ALWAYS TAKEN
sign,
width,
lead
);
}
}
10adef: 8d 65 f4 lea -0xc(%ebp),%esp
10adf2: 5b pop %ebx
10adf3: 5e pop %esi
10adf4: 5f pop %edi
10adf5: c9 leave
10adf6: c3 ret
10adf7: 90 nop
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
10adf8: 31 d2 xor %edx,%edx
10adfa: c7 45 c0 08 00 00 00 movl $0x8,-0x40(%ebp)
10ae01: e9 0f ff ff ff jmp 10ad15 <vprintk+0x101>
10ae06: 66 90 xchg %ax,%ax
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
10ae08: 46 inc %esi
10ae09: 8a 16 mov (%esi),%dl
}
if ( c == 'c' ) {
10ae0b: 80 fa 63 cmp $0x63,%dl
10ae0e: 0f 85 84 fe ff ff jne 10ac98 <vprintk+0x84> <== ALWAYS TAKEN
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
10ae14: 8b 5d 0c mov 0xc(%ebp),%ebx
10ae17: 83 c3 04 add $0x4,%ebx
BSP_output_char(chr);
10ae1a: 83 ec 0c sub $0xc,%esp
10ae1d: 8b 55 0c mov 0xc(%ebp),%edx
10ae20: 0f be 02 movsbl (%edx),%eax
10ae23: 50 push %eax
10ae24: ff 15 a8 3b 12 00 call *0x123ba8
continue;
10ae2a: 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);
10ae2d: 89 5d 0c mov %ebx,0xc(%ebp)
BSP_output_char(chr);
continue;
10ae30: e9 07 fe ff ff jmp 10ac3c <vprintk+0x28>
10ae35: 8d 76 00 lea 0x0(%esi),%esi
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
10ae38: 46 inc %esi
10ae39: 8a 06 mov (%esi),%al
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
10ae3b: bf 01 00 00 00 mov $0x1,%edi
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
10ae40: 8d 50 d0 lea -0x30(%eax),%edx
10ae43: 80 fa 09 cmp $0x9,%dl
10ae46: 0f 86 22 fe ff ff jbe 10ac6e <vprintk+0x5a> <== ALWAYS TAKEN
10ae4c: 31 db xor %ebx,%ebx
10ae4e: e9 32 fe ff ff jmp 10ac85 <vprintk+0x71>
10ae53: 90 nop
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
10ae54: 46 inc %esi
10ae55: 8a 06 mov (%esi),%al
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
10ae57: b1 30 mov $0x30,%cl
10ae59: e9 fa fd ff ff jmp 10ac58 <vprintk+0x44>
10ae5e: 66 90 xchg %ax,%ax
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
10ae60: 8b 45 0c mov 0xc(%ebp),%eax
10ae63: 83 c0 04 add $0x4,%eax
10ae66: 89 45 c0 mov %eax,-0x40(%ebp)
10ae69: 8b 55 0c mov 0xc(%ebp),%edx
10ae6c: 8b 02 mov (%edx),%eax
if ( str == NULL ) {
10ae6e: 85 c0 test %eax,%eax
10ae70: 0f 84 37 01 00 00 je 10afad <vprintk+0x399>
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
10ae76: 80 38 00 cmpb $0x0,(%eax)
10ae79: 0f 84 3c 01 00 00 je 10afbb <vprintk+0x3a7>
10ae7f: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
10ae86: 31 d2 xor %edx,%edx
10ae88: 42 inc %edx
10ae89: 80 3c 10 00 cmpb $0x0,(%eax,%edx,1)
10ae8d: 75 f9 jne 10ae88 <vprintk+0x274>
10ae8f: 89 55 c4 mov %edx,-0x3c(%ebp)
;
/* leading spaces */
if ( !minus )
10ae92: 89 fa mov %edi,%edx
10ae94: 84 d2 test %dl,%dl
10ae96: 75 32 jne 10aeca <vprintk+0x2b6>
for ( i=len ; i<width ; i++ )
10ae98: 39 5d c4 cmp %ebx,-0x3c(%ebp)
10ae9b: 73 2d jae 10aeca <vprintk+0x2b6>
10ae9d: 8b 4d c4 mov -0x3c(%ebp),%ecx
10aea0: 88 55 bc mov %dl,-0x44(%ebp)
10aea3: 89 c7 mov %eax,%edi
10aea5: 89 75 b8 mov %esi,-0x48(%ebp)
10aea8: 89 de mov %ebx,%esi
10aeaa: 89 cb mov %ecx,%ebx
BSP_output_char(' ');
10aeac: 83 ec 0c sub $0xc,%esp
10aeaf: 6a 20 push $0x20
10aeb1: ff 15 a8 3b 12 00 call *0x123ba8
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
10aeb7: 43 inc %ebx
10aeb8: 83 c4 10 add $0x10,%esp
10aebb: 39 f3 cmp %esi,%ebx
10aebd: 72 ed jb 10aeac <vprintk+0x298>
10aebf: 89 f8 mov %edi,%eax
10aec1: 89 f3 mov %esi,%ebx
10aec3: 0f b6 7d bc movzbl -0x44(%ebp),%edi
10aec7: 8b 75 b8 mov -0x48(%ebp),%esi
BSP_output_char(' ');
/* no width option */
if (width == 0) {
10aeca: 85 db test %ebx,%ebx
10aecc: 75 0a jne 10aed8 <vprintk+0x2c4>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10aece: 8b 55 c4 mov -0x3c(%ebp),%edx
10aed1: 85 d2 test %edx,%edx
10aed3: 74 47 je 10af1c <vprintk+0x308>
10aed5: 8b 5d c4 mov -0x3c(%ebp),%ebx
10aed8: 8a 10 mov (%eax),%dl
10aeda: 84 d2 test %dl,%dl
10aedc: 74 3e je 10af1c <vprintk+0x308> <== NEVER TAKEN
BSP_output_char(*str);
10aede: 83 ec 0c sub $0xc,%esp
10aee1: 0f be d2 movsbl %dl,%edx
10aee4: 52 push %edx
10aee5: 89 45 ac mov %eax,-0x54(%ebp)
10aee8: ff 15 a8 3b 12 00 call *0x123ba8
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10aeee: 8b 45 ac mov -0x54(%ebp),%eax
10aef1: 40 inc %eax
10aef2: 83 c4 10 add $0x10,%esp
10aef5: 89 75 bc mov %esi,-0x44(%ebp)
10aef8: 89 de mov %ebx,%esi
10aefa: 89 c3 mov %eax,%ebx
10aefc: eb 13 jmp 10af11 <vprintk+0x2fd>
10aefe: 66 90 xchg %ax,%ax
BSP_output_char(*str);
10af00: 83 ec 0c sub $0xc,%esp
10af03: 0f be d2 movsbl %dl,%edx
10af06: 52 push %edx
10af07: ff 15 a8 3b 12 00 call *0x123ba8
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
10af0d: 43 inc %ebx
10af0e: 83 c4 10 add $0x10,%esp
10af11: 8a 13 mov (%ebx),%dl
10af13: 84 d2 test %dl,%dl
10af15: 75 e9 jne 10af00 <vprintk+0x2ec>
10af17: 89 f3 mov %esi,%ebx
10af19: 8b 75 bc mov -0x44(%ebp),%esi
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
10af1c: 89 f8 mov %edi,%eax
10af1e: 84 c0 test %al,%al
10af20: 74 28 je 10af4a <vprintk+0x336>
for ( i=len ; i<width ; i++ )
10af22: 39 5d c4 cmp %ebx,-0x3c(%ebp)
10af25: 73 18 jae 10af3f <vprintk+0x32b>
10af27: 8b 7d c4 mov -0x3c(%ebp),%edi
10af2a: 66 90 xchg %ax,%ax
BSP_output_char(' ');
10af2c: 83 ec 0c sub $0xc,%esp
10af2f: 6a 20 push $0x20
10af31: ff 15 a8 3b 12 00 call *0x123ba8
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
10af37: 47 inc %edi
10af38: 83 c4 10 add $0x10,%esp
10af3b: 39 df cmp %ebx,%edi
10af3d: 72 ed jb 10af2c <vprintk+0x318>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
10af3f: 8b 55 c0 mov -0x40(%ebp),%edx
10af42: 89 55 0c mov %edx,0xc(%ebp)
10af45: e9 f2 fc ff ff jmp 10ac3c <vprintk+0x28>
10af4a: 8b 45 c0 mov -0x40(%ebp),%eax
10af4d: 89 45 0c mov %eax,0xc(%ebp)
10af50: e9 e7 fc ff ff jmp 10ac3c <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;
10af55: 31 d2 xor %edx,%edx
10af57: c7 45 c0 0a 00 00 00 movl $0xa,-0x40(%ebp)
10af5e: e9 b2 fd ff ff jmp 10ad15 <vprintk+0x101>
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
10af63: 83 ec 0c sub $0xc,%esp
10af66: 6a 2d push $0x2d
10af68: ff 15 a8 3b 12 00 call *0x123ba8
unsigned_num = (unsigned long) -num;
10af6e: f7 df neg %edi
10af70: 89 7d b8 mov %edi,-0x48(%ebp)
if (maxwidth) maxwidth--;
10af73: 83 c4 10 add $0x10,%esp
10af76: 83 fb 01 cmp $0x1,%ebx
10af79: 83 d3 ff adc $0xffffffff,%ebx
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
10af7c: 8b 45 b8 mov -0x48(%ebp),%eax
10af7f: 31 d2 xor %edx,%edx
10af81: f7 75 c0 divl -0x40(%ebp)
10af84: 89 c1 mov %eax,%ecx
10af86: 85 c0 test %eax,%eax
10af88: 0f 85 b9 fd ff ff jne 10ad47 <vprintk+0x133>
10af8e: 8b 4d b8 mov -0x48(%ebp),%ecx
10af91: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
10af98: 31 ff xor %edi,%edi
10af9a: e9 e0 fd ff ff jmp 10ad7f <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;
10af9f: 31 d2 xor %edx,%edx
10afa1: c7 45 c0 10 00 00 00 movl $0x10,-0x40(%ebp)
10afa8: e9 68 fd ff ff jmp 10ad15 <vprintk+0x101>
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
10afad: b8 c9 14 12 00 mov $0x1214c9,%eax
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
10afb2: 80 38 00 cmpb $0x0,(%eax)
10afb5: 0f 85 c4 fe ff ff jne 10ae7f <vprintk+0x26b> <== NEVER TAKEN
10afbb: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
10afc2: e9 cb fe ff ff jmp 10ae92 <vprintk+0x27e>
} else {
BSP_output_char(c);
continue;
}
printNum(
10afc7: 0f be c9 movsbl %cl,%ecx
10afca: 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;
10afcd: 31 d2 xor %edx,%edx
10afcf: c7 45 c0 10 00 00 00 movl $0x10,-0x40(%ebp)
10afd6: e9 40 fd ff ff jmp 10ad1b <vprintk+0x107>
0011f498 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
11f498: 55 push %ebp
11f499: 89 e5 mov %esp,%ebp
11f49b: 53 push %ebx
11f49c: 83 ec 04 sub $0x4,%esp
11f49f: 8b 4d 08 mov 0x8(%ebp),%ecx
11f4a2: 8b 45 0c mov 0xc(%ebp),%eax
11f4a5: 8b 55 10 mov 0x10(%ebp),%edx
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
11f4a8: 3b 0d 2c 3a 12 00 cmp 0x123a2c,%ecx
11f4ae: 73 50 jae 11f500 <write+0x68>
iop = rtems_libio_iop( fd );
11f4b0: c1 e1 03 shl $0x3,%ecx
11f4b3: 8d 1c cd 00 00 00 00 lea 0x0(,%ecx,8),%ebx
11f4ba: 29 cb sub %ecx,%ebx
11f4bc: 03 1d e0 7c 12 00 add 0x127ce0,%ebx
rtems_libio_check_is_open( iop );
11f4c2: 8b 4b 14 mov 0x14(%ebx),%ecx
11f4c5: f6 c5 01 test $0x1,%ch
11f4c8: 74 36 je 11f500 <write+0x68>
rtems_libio_check_buffer( buffer );
11f4ca: 85 c0 test %eax,%eax
11f4cc: 74 46 je 11f514 <write+0x7c> <== NEVER TAKEN
rtems_libio_check_count( count );
11f4ce: 85 d2 test %edx,%edx
11f4d0: 74 26 je 11f4f8 <write+0x60>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
11f4d2: 83 e1 04 and $0x4,%ecx
11f4d5: 74 3d je 11f514 <write+0x7c>
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
11f4d7: 51 push %ecx
11f4d8: 8b 4b 20 mov 0x20(%ebx),%ecx
11f4db: 52 push %edx
11f4dc: 50 push %eax
11f4dd: 53 push %ebx
11f4de: ff 51 0c call *0xc(%ecx)
if ( rc > 0 )
11f4e1: 83 c4 10 add $0x10,%esp
11f4e4: 85 c0 test %eax,%eax
11f4e6: 7e 0b jle 11f4f3 <write+0x5b>
iop->offset += rc;
11f4e8: 89 c1 mov %eax,%ecx
11f4ea: c1 f9 1f sar $0x1f,%ecx
11f4ed: 01 43 0c add %eax,0xc(%ebx)
11f4f0: 11 4b 10 adc %ecx,0x10(%ebx)
return rc;
}
11f4f3: 8b 5d fc mov -0x4(%ebp),%ebx
11f4f6: c9 leave
11f4f7: c3 ret
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 );
11f4f8: 31 c0 xor %eax,%eax
if ( rc > 0 )
iop->offset += rc;
return rc;
}
11f4fa: 8b 5d fc mov -0x4(%ebp),%ebx
11f4fd: c9 leave
11f4fe: c3 ret
11f4ff: 90 nop
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
11f500: e8 df 3d ff ff call 1132e4 <__errno>
11f505: c7 00 09 00 00 00 movl $0x9,(%eax)
11f50b: b8 ff ff ff ff mov $0xffffffff,%eax
11f510: eb e1 jmp 11f4f3 <write+0x5b>
11f512: 66 90 xchg %ax,%ax
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
11f514: e8 cb 3d ff ff call 1132e4 <__errno>
11f519: c7 00 16 00 00 00 movl $0x16,(%eax)
11f51f: b8 ff ff ff ff mov $0xffffffff,%eax
11f524: eb cd jmp 11f4f3 <write+0x5b>
0010c004 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
10c004: 55 push %ebp
10c005: 89 e5 mov %esp,%ebp
10c007: 57 push %edi
10c008: 56 push %esi
10c009: 53 push %ebx
10c00a: 83 ec 3c sub $0x3c,%esp
10c00d: 8b 45 08 mov 0x8(%ebp),%eax
10c010: 8b 5d 0c mov 0xc(%ebp),%ebx
10c013: 8b 7d 10 mov 0x10(%ebp),%edi
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
10c016: 3b 05 4c 41 12 00 cmp 0x12414c,%eax
10c01c: 0f 83 ea 00 00 00 jae 10c10c <writev+0x108>
iop = rtems_libio_iop( fd );
10c022: c1 e0 03 shl $0x3,%eax
10c025: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
10c02c: 29 c2 sub %eax,%edx
10c02e: 8b 0d 00 84 12 00 mov 0x128400,%ecx
10c034: 01 ca add %ecx,%edx
10c036: 89 55 e4 mov %edx,-0x1c(%ebp)
rtems_libio_check_is_open( iop );
10c039: 8b 42 14 mov 0x14(%edx),%eax
10c03c: f6 c4 01 test $0x1,%ah
10c03f: 0f 84 c7 00 00 00 je 10c10c <writev+0x108>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
10c045: a8 04 test $0x4,%al
10c047: 74 6b je 10c0b4 <writev+0xb0> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
10c049: 85 db test %ebx,%ebx
10c04b: 74 67 je 10c0b4 <writev+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
10c04d: 85 ff test %edi,%edi
10c04f: 7e 63 jle 10c0b4 <writev+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
10c051: 81 ff 00 04 00 00 cmp $0x400,%edi
10c057: 7f 5b jg 10c0b4 <writev+0xb0> <== NEVER TAKEN
10c059: be 01 00 00 00 mov $0x1,%esi
10c05e: 31 c0 xor %eax,%eax
10c060: 31 c9 xor %ecx,%ecx
10c062: eb 02 jmp 10c066 <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++ ) {
10c064: 89 d1 mov %edx,%ecx
/*
* iov[v].iov_len cannot be less than 0 because size_t is unsigned.
* So we only check for zero.
*/
if ( iov[v].iov_base == 0 )
10c066: 8b 14 c3 mov (%ebx,%eax,8),%edx
10c069: 85 d2 test %edx,%edx
10c06b: 74 47 je 10c0b4 <writev+0xb0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
10c06d: 8b 54 c3 04 mov 0x4(%ebx,%eax,8),%edx
10c071: 85 d2 test %edx,%edx
10c073: 74 02 je 10c077 <writev+0x73>
all_zeros = false;
10c075: 31 f6 xor %esi,%esi
/* check for wrap */
old = total;
total += iov[v].iov_len;
10c077: 8d 14 11 lea (%ecx,%edx,1),%edx
if ( total < old || total > SSIZE_MAX )
10c07a: 39 ca cmp %ecx,%edx
10c07c: 7c 36 jl 10c0b4 <writev+0xb0>
10c07e: 81 fa ff 7f 00 00 cmp $0x7fff,%edx
10c084: 7f 2e jg 10c0b4 <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++ ) {
10c086: 40 inc %eax
10c087: 39 c7 cmp %eax,%edi
10c089: 7f d9 jg 10c064 <writev+0x60>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
10c08b: 89 f0 mov %esi,%eax
10c08d: 84 c0 test %al,%al
10c08f: 75 3d jne 10c0ce <writev+0xca>
10c091: 31 f6 xor %esi,%esi
10c093: 31 d2 xor %edx,%edx
10c095: 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 )
10c098: 8b 44 f3 04 mov 0x4(%ebx,%esi,8),%eax
10c09c: 85 c0 test %eax,%eax
10c09e: 75 32 jne 10c0d2 <writev+0xce> <== ALWAYS TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
10c0a0: 46 inc %esi
10c0a1: 39 f7 cmp %esi,%edi
10c0a3: 7f f3 jg 10c098 <writev+0x94>
10c0a5: 8b 55 c0 mov -0x40(%ebp),%edx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10c0a8: 89 d0 mov %edx,%eax
10c0aa: 8d 65 f4 lea -0xc(%ebp),%esp
10c0ad: 5b pop %ebx
10c0ae: 5e pop %esi
10c0af: 5f pop %edi
10c0b0: c9 leave
10c0b1: c3 ret
10c0b2: 66 90 xchg %ax,%ax
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
10c0b4: e8 bb 7f 00 00 call 114074 <__errno>
10c0b9: c7 00 16 00 00 00 movl $0x16,(%eax)
10c0bf: ba ff ff ff ff mov $0xffffffff,%edx
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
10c0c4: 89 d0 mov %edx,%eax
10c0c6: 8d 65 f4 lea -0xc(%ebp),%esp
10c0c9: 5b pop %ebx
10c0ca: 5e pop %esi
10c0cb: 5f pop %edi
10c0cc: c9 leave
10c0cd: c3 ret
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
return 0;
10c0ce: 31 d2 xor %edx,%edx
10c0d0: eb f2 jmp 10c0c4 <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)(
10c0d2: 52 push %edx
10c0d3: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c0d6: 8b 51 20 mov 0x20(%ecx),%edx
10c0d9: 50 push %eax
10c0da: ff 34 f3 pushl (%ebx,%esi,8)
10c0dd: 51 push %ecx
10c0de: ff 52 0c call *0xc(%edx)
10c0e1: 89 45 c4 mov %eax,-0x3c(%ebp)
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
10c0e4: 83 c4 10 add $0x10,%esp
10c0e7: 83 f8 00 cmp $0x0,%eax
10c0ea: 7c 32 jl 10c11e <writev+0x11a> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
10c0ec: 74 10 je 10c0fe <writev+0xfa> <== NEVER TAKEN
iop->offset += bytes;
10c0ee: 99 cltd
10c0ef: 8b 4d e4 mov -0x1c(%ebp),%ecx
10c0f2: 01 41 0c add %eax,0xc(%ecx)
10c0f5: 11 51 10 adc %edx,0x10(%ecx)
total += bytes;
10c0f8: 8b 45 c4 mov -0x3c(%ebp),%eax
10c0fb: 01 45 c0 add %eax,-0x40(%ebp)
}
if (bytes != iov[ v ].iov_len)
10c0fe: 8b 55 c4 mov -0x3c(%ebp),%edx
10c101: 3b 54 f3 04 cmp 0x4(%ebx,%esi,8),%edx
10c105: 74 99 je 10c0a0 <writev+0x9c> <== ALWAYS TAKEN
10c107: eb 9c jmp 10c0a5 <writev+0xa1> <== NOT EXECUTED
10c109: 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 );
10c10c: e8 63 7f 00 00 call 114074 <__errno>
10c111: c7 00 09 00 00 00 movl $0x9,(%eax)
10c117: ba ff ff ff ff mov $0xffffffff,%edx
10c11c: eb a6 jmp 10c0c4 <writev+0xc0>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
10c11e: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED
10c121: eb a1 jmp 10c0c4 <writev+0xc0> <== NOT EXECUTED