]> rtime.felk.cvut.cz Git - jailhouse.git/blob - inmates/lib/string.c
inmates: Provide memset implementation for non-built-in cases
[jailhouse.git] / inmates / lib / string.c
1 /*
2  * Jailhouse, a Linux-based partitioning hypervisor
3  *
4  * Copyright (c) Siemens AG, 2016
5  *
6  * Authors:
7  *  Jan Kiszka <jan.kiszka@siemens.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2.  See
10  * the COPYING file in the top-level directory.
11  */
12
13 #include <inmate.h>
14
15 void *memset(void *s, int c, unsigned long n)
16 {
17         u8 *p = s;
18
19         while (n-- > 0)
20                 *p++ = c;
21         return s;
22 }