Changeset b2de426 in rtems
- Timestamp:
- Aug 6, 2018, 9:53:42 AM (2 years ago)
- Branches:
- 5, master
- Children:
- 0fc87d47
- Parents:
- 66cb142
- git-author:
- Sebastian Huber <sebastian.huber@…> (08/06/18 09:53:42)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (08/10/18 05:14:43)
- Location:
- cpukit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/include/rtems/rtems/partimpl.h
r66cb142 rb2de426 78 78 ) 79 79 { 80 uint32_toffset;81 82 offset = (uint32_t)_Addresses_Subtract(80 intptr_t offset; 81 82 offset = _Addresses_Subtract( 83 83 the_buffer, 84 84 the_partition->starting_address -
cpukit/include/rtems/score/address.h
r66cb142 rb2de426 78 78 79 79 /** 80 * @brief Subtract two offsets.80 * @brief Subtract two addresses. 81 81 * 82 82 * This function is used to subtract two addresses. It returns the … … 87 87 * 88 88 * @return This method returns the resulting address. 89 *90 * @note The cast of an address to an uint32_t makes this code91 * dependent on an addresses being thirty two bits.92 89 */ 93 RTEMS_INLINE_ROUTINE int 32_t _Addresses_Subtract(90 RTEMS_INLINE_ROUTINE intptr_t _Addresses_Subtract( 94 91 const void *left, 95 92 const void *right 96 93 ) 97 94 { 98 return (int 32_t) ((const char *) left - (const char *) right);95 return (intptr_t) ( (const char *) left - (const char *) right ); 99 96 } 100 97 -
cpukit/rtems/src/dpmemexternal2internal.c
r66cb142 rb2de426 30 30 Dual_ported_memory_Control *the_port; 31 31 ISR_lock_Context lock_context; 32 uint 32_t ending;32 uintptr_t length; 33 33 34 34 if ( internal == NULL ) { … … 42 42 } 43 43 44 ending =_Addresses_Subtract( external, the_port->external_base );44 length = (uintptr_t) _Addresses_Subtract( external, the_port->external_base ); 45 45 46 if ( ending> the_port->length ) {46 if ( length > the_port->length ) { 47 47 *internal = external; 48 48 } else { 49 *internal = _Addresses_Add_offset( the_port->internal_base, ending);49 *internal = _Addresses_Add_offset( the_port->internal_base, length ); 50 50 } 51 51 -
cpukit/rtems/src/dpmeminternal2external.c
r66cb142 rb2de426 30 30 Dual_ported_memory_Control *the_port; 31 31 ISR_lock_Context lock_context; 32 uint 32_t ending;32 uintptr_t length; 33 33 34 34 if ( external == NULL ) { … … 42 42 } 43 43 44 ending =_Addresses_Subtract( internal, the_port->internal_base );44 length = (uintptr_t) _Addresses_Subtract( internal, the_port->internal_base ); 45 45 46 if ( ending> the_port->length ) {46 if ( length > the_port->length ) { 47 47 *external = internal; 48 48 } else { 49 *external = _Addresses_Add_offset( the_port->external_base, ending);49 *external = _Addresses_Add_offset( the_port->external_base, length ); 50 50 } 51 51
Note: See TracChangeset
for help on using the changeset viewer.