Ignore:
Timestamp:
Jun 30, 2017, 11:03:08 AM (4 years ago)
Author:
max@…
Message:

add memcmp in libk; these mem* functions should probably be hal-
specific, for better performance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/libk/memcpy.h

    r11 r113  
    2727/*******************************************************************************************
    2828 * This function copies a source buffer to a destination buffer.
    29  * There is no alignment constraint, but the performances are improved if th buffers
    30  * are both aligned on a 32 bits word boundary. 
     29 * There is no alignment constraint, but the performance is improved if the buffers
     30 * are both aligned on a 32 bits word boundary.
    3131 *******************************************************************************************
    3232 * @ dst     : pointer on destination buffer.
     
    3737void * memcpy( void       * dst,
    3838               const void * src,
    39                uint32_t     size ); 
     39               uint32_t     size );
    4040
    4141/*******************************************************************************************
    42  * This function set a constant value in each byte of a target buffer.
     42 * This function sets a constant value in each byte of a target buffer.
    4343 *******************************************************************************************
    4444 * @ dst     : pointer on destination buffer.
    45  * @ val     : constant value (casted to uint8_t).
     45 * @ val     : constant value (cast to uint8_t).
    4646 * @ size    : number of bytes.
    4747 * @ return pointer on destination buffer.
    4848 ******************************************************************************************/
    49 void * memset( void     * dst, 
     49void * memset( void     * dst,
    5050               uint32_t   val,
    51                uint32_t size); 
     51               uint32_t size);
    5252
     53/*******************************************************************************************
     54 * TODO
     55 ******************************************************************************************/
     56int memcmp( const void * s1,
     57            const void * s2,
     58            uint32_t     n);
     59
Note: See TracChangeset for help on using the changeset viewer.