1 /* 2 * Copyright (C) 1991, 1992 Linus Torvalds 3 */ 4 5 #include <xen/string.h> 6 7 /** 8 * memset - Fill a region of memory with the given value 9 * @s: Pointer to the start of the area. 10 * @c: The byte to fill the area with 11 * @n: The size of the area. 12 * 13 * Do not use memset() to access IO space, use memset_io() instead. 14 */ 15 void *(memset)(void *s, int c, size_t n) 16 { 17 char *xs = (char *) s; 18 19 while (n--) 20 *xs++ = c; 21 22 return s; 23 } 24 25 /* 26 * Local variables: 27 * mode: C 28 * c-file-style: "BSD" 29 * c-basic-offset: 8 30 * tab-width: 8 31 * indent-tabs-mode: t 32 * End: 33 */ 34