Eliminate definitions of k_memset() and k_memcpy()

These APIs are no longer referenced anywhere.

Change-Id: I56e3410b9fb6bc4eb72bc9299b33f75227916434
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
Allan Stephens 2015-05-25 13:49:15 -04:00 committed by Anas Nashif
commit 3c0b6f0379
3 changed files with 0 additions and 74 deletions

View file

@ -59,9 +59,6 @@ extern "C" {
#define TICK_EVENT 0
#define k_memcpy memcpy
#define k_memset memset
#ifdef __cplusplus
}
#endif

View file

@ -55,9 +55,6 @@ extern "C" {
#define OCTET_TO_SIZEOFUNIT(X) (X)
#define SIZEOFUNIT_TO_OCTET(X) (X)
#define k_memcpy memcpy
#define k_memset memset
#ifdef __cplusplus
}
#endif

View file

@ -390,73 +390,5 @@ static inline inline __attribute__((always_inline))
return retLong;
}
/********************************************************
*
* k_memcpy - copy memory area
*
* Copy _n bytes from source _s to destination _d
*
* RETURNS: N/A
*
* \NOMANUAL
*/
static inline void k_memcpy(void *_d, const void *_s, size_t _n)
{
/* _d & _s must be aligned to use movsl. */
#ifndef CONFIG_UNALIGNED_WRITE_UNSUPPORTED
if ((_n&3) == 0) {
/* _n is multiple of words, much more efficient to do word moves */
_n >>= 2;
__asm__ volatile ("rep movsl" :
"+D" (_d), "+S" (_s), "+c" (_n) :
:
"cc", "memory");
} else
#endif /* CONFIG_UNALIGNED_WRITE_UNSUPPORTED */
{
__asm__ volatile ("rep movsb" :
"+D" (_d), "+S" (_s), "+c" (_n) :
:
"cc", "memory");
}
}
/********************************************************
*
* k_memset - set memory area
*
* Set _n bytes in the area _d to value _v
*
* RETURNS: N/A
*
* \NOMANUAL
*/
static inline void k_memset(void *_d, int _v, size_t _n)
{
/* _d must be aligned to use stosl. */
#ifndef CONFIG_UNALIGNED_WRITE_UNSUPPORTED
if ((_n&3) == 0) {
/* _n is multiple of words, much more efficient to do word stores */
_n >>= 2;
_v |= _v<<8;
_v |= _v<<16;
__asm__ volatile ("rep stosl" :
"+D" (_d), "+c" (_n) :
"a" (_v) :
"cc", "memory");
} else
#endif /* CONFIG_UNALIGNED_WRITE_UNSUPPORTED */
{
__asm__ volatile ("rep stosb" :
"+D" (_d), "+c" (_n) :
"a" (_v) :
"cc", "memory");
}
}
#endif /* _ASMLANGUAGE */
#endif /* _ASM_INLINE_GCC_PUBLIC_GCC_H */