2014-03-23 18:40:31 +01:00
|
|
|
// Copyright 2008-2009 Segher Boessenkool <segher@kernel.crashing.org>
|
|
|
|
// This code is licensed to you under the terms of the GNU GPL, version 2;
|
|
|
|
// see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
|
2014-03-31 16:33:24 +02:00
|
|
|
#include "types.h"
|
|
|
|
void * _memset(void *b, u8 c, u32 len)
|
2014-03-23 18:40:31 +01:00
|
|
|
{
|
2014-03-31 16:33:24 +02:00
|
|
|
u32 i;
|
2014-03-23 18:40:31 +01:00
|
|
|
|
|
|
|
for (i = 0; i < len; i++)
|
2014-03-31 16:33:24 +02:00
|
|
|
((u8*)b)[i] = c;
|
2014-03-23 18:40:31 +01:00
|
|
|
|
|
|
|
return b;
|
|
|
|
}
|
|
|
|
|
2014-03-31 16:33:24 +02:00
|
|
|
void * _memcpy(void *dst, const void *src, u32 len)
|
2014-03-23 18:40:31 +01:00
|
|
|
{
|
2014-03-31 16:33:24 +02:00
|
|
|
u32 i;
|
2014-03-23 18:40:31 +01:00
|
|
|
|
|
|
|
for (i = 0; i < len; i++)
|
2014-03-31 16:33:24 +02:00
|
|
|
((u8*)dst)[i] = ((u8*)src)[i];
|
2014-03-23 18:40:31 +01:00
|
|
|
|
|
|
|
return dst;
|
|
|
|
}
|