shithub: p9-stm32-example-os

ref: f801657f77f3923ec2388c25bdcb036c8019ba89
dir: /libkern/memset.c/

View raw version
#include	<u.h>
#include	"kern.h"

void*
memset(void *ap, int c, ulong n)
{
	char *p;
	int m = (int)n;

	p = ap;
	while(m > 0) {
		*p++ = c;
		m--;
	}
	return ap;
}